@@ -40,6 +40,12 @@ describe("FEATURE: License", () => {
4040 expect ( await licenseExpired ( ) ) . toBe ( "Your license expired. Please update the license to continue using the Particular Service Platform." ) ;
4141 } ) ;
4242 } ) ;
43+ test . todo ( "EXAMPLE: Only 'LICENSE' tab is visible when license has expired" ) ;
44+
45+ /* SCENARIO
46+ Given an expired license
47+ Then "LICENSE" is the only visible tab in the Configuration screen
48+ */
4349 } ) ;
4450
4551 describe ( "RULE: License expiring soon must be displayed" , ( ) => {
@@ -48,26 +54,26 @@ describe("FEATURE: License", () => {
4854 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . Subscription , 10 ) ) ;
4955 await driver . goTo ( "/configuration/license" ) ;
5056 await waitFor ( async ( ) => {
51- // expect(await licenseExpiryDaysLeft()).toBeVisible(); //License expiry date: 2/5/2025 - expiring in 11 days
52- expect ( await licenseExpiryDaysLeft ( ) ) . toContain ( "expiring in" ) ; //License expiry date: 2/5/2025 - expiring in 11 days
57+ expect ( await licenseExpiryDaysLeft ( ) ) . toBeVisible ( ) ; //License expiry date: 2/5/2025 - expiring in 11 days
58+ expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "expiring in" ) ; //License expiry date: 2/5/2025 - expiring in 11 days
5359 } ) ;
5460 } ) ;
5561 test ( "EXAMPLE: License expiring tomorrow should show 'expiring tomorrow'" , async ( { driver } ) => {
5662 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
5763 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . Subscription , 0 ) ) ;
5864 await driver . goTo ( "/configuration/license" ) ;
5965 await waitFor ( async ( ) => {
60- // expect(await licenseExpiryDaysLeft()).toBeVisible();
61- expect ( await licenseExpiryDaysLeft ( ) ) . toContain ( "expiring tomorrow" ) ;
66+ expect ( await licenseExpiryDaysLeft ( ) ) . toBeVisible ( ) ;
67+ expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "expiring tomorrow" ) ;
6268 } ) ;
6369 } ) ;
6470 test ( "EXAMPLE: License expiring today should show 'expiring today'" , async ( { driver } ) => {
6571 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
6672 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . Subscription , - 1 ) ) ;
6773 await driver . goTo ( "/configuration/license" ) ;
6874 await waitFor ( async ( ) => {
69- // expect(await licenseExpiryDaysLeft()).toBeVisible();
70- expect ( await licenseExpiryDaysLeft ( ) ) . toContain ( "expiring today" ) ;
75+ expect ( await licenseExpiryDaysLeft ( ) ) . toBeVisible ( ) ;
76+ expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "expiring today" ) ;
7177 } ) ;
7278 } ) ;
7379 } ) ;
@@ -78,35 +84,27 @@ describe("FEATURE: License", () => {
7884 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . UpgradeProtection , 10 ) ) ;
7985 await driver . goTo ( "/configuration/license" ) ;
8086 await waitFor ( async ( ) => {
81- // expect(await licenseExpiryDaysLeft()).toBeVisible(); //License expiry date: 2/5/2025 - expiring in 11 days
82- expect ( await licenseExpiryDaysLeft ( ) ) . toContain ( "days left" ) ; //License expiry date: 2/5/2025 - expiring in 11 days
87+ expect ( await licenseExpiryDaysLeft ( ) ) . toBeVisible ( ) ; //License expiry date: 2/5/2025 - expiring in 11 days
88+ expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "days left" ) ; //License expiry date: 2/5/2025 - expiring in 11 days
8389 } ) ;
8490 } ) ;
8591 test ( "EXAMPLE: Upgrade Protection license expiring tomorrow should show 'expiring tomorrow'" , async ( { driver } ) => {
8692 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
8793 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . UpgradeProtection , 0 ) ) ;
8894 await driver . goTo ( "/configuration/license" ) ;
8995 await waitFor ( async ( ) => {
90- // expect(await licenseExpiryDaysLeft()).toBeVisible();
91- expect ( await licenseExpiryDaysLeft ( ) ) . toContain ( "1 day left" ) ;
96+ expect ( await licenseExpiryDaysLeft ( ) ) . toBeVisible ( ) ;
97+ expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "1 day left" ) ;
9298 } ) ;
9399 } ) ;
94100 test ( "EXAMPLE: Upgrade Protection license expiring today should show 'expired'" , async ( { driver } ) => {
95101 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
96102 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . UpgradeProtection , - 1 ) ) ;
97103 await driver . goTo ( "/configuration/license" ) ;
98104 await waitFor ( async ( ) => {
99- // expect(await licenseExpiryDaysLeft()).toBeVisible();
100- expect ( await licenseExpiryDaysLeft ( ) ) . toContain ( "expired" ) ;
105+ expect ( await licenseExpiryDaysLeft ( ) ) . toBeVisible ( ) ;
106+ expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "expired" ) ;
101107 } ) ;
102108 } ) ;
103109 } ) ;
104- describe ( "RULE: Non-license options should be hidden if license has expired" , ( ) => {
105- test . todo ( "EXAMPLE: Only 'LICENSE' tab is visible when license has expired" ) ;
106-
107- /* SCENARIO
108- Given an expired license
109- Then "LICENSE" is the only visible tab in the Configuration screen
110- */
111- } ) ;
112110} ) ;
0 commit comments