@@ -10,9 +10,7 @@ import { LicenseType } from "@/resources/LicenseInfo";
1010import { licenseTabList , licenseTabNames } from "./questions/licenseTabs" ;
1111
1212describe ( "FEATURE: License" , ( ) => {
13- describe ( "RULE: Platform license type should be shown shown" , ( ) => {
14- test . todo ( "EXAMPLE: The platform is running a trial license" ) ;
15-
13+ describe ( "RULE: Platform license type should be shown" , ( ) => {
1614 test ( "EXAMPLE: The platform is running a commercial license" , async ( { driver } ) => {
1715 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
1816 await driver . setUp ( precondition . hasActiveLicense ) ;
@@ -43,7 +41,7 @@ describe("FEATURE: License", () => {
4341 expect ( await licenseExpired ( ) ) . toBe ( "Your license expired. Please update the license to continue using the Particular Service Platform." ) ;
4442 } ) ;
4543 } ) ;
46- test ( "EXAMPLE: An expired license shows only the license and usage setup tabs " , async ( { driver } ) => {
44+ test ( "EXAMPLE: Visiting the configuration page with an expired license " , async ( { driver } ) => {
4745 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
4846 await driver . setUp ( precondition . hasExpiredLicense ( LicenseType . Subscription , 5 ) ) ; //license expired 6 days before
4947 await driver . goTo ( "/configuration/license" ) ;
@@ -55,16 +53,16 @@ describe("FEATURE: License", () => {
5553 } ) ;
5654
5755 describe ( "RULE: License expiring soon must be displayed" , ( ) => {
58- test ( "EXAMPLE: License expiring with x days shows 'expiring in X days' " , async ( { driver } ) => {
56+ test ( "EXAMPLE: License expiring in 11 days" , async ( { driver } ) => {
5957 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
6058 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . Subscription , 10 ) ) ;
6159 await driver . goTo ( "/configuration/license" ) ;
6260 await waitFor ( async ( ) => {
63- expect ( await licenseExpiryDaysLeft ( ) ) . toBeVisible ( ) ; //License expiry date: 2/5/2025 - expiring in 11 days
64- expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "expiring in" ) ; //License expiry date: 2/5/2025 - expiring in 11 days
61+ expect ( await licenseExpiryDaysLeft ( ) ) . toBeVisible ( ) ;
62+ expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "expiring in 11 days" ) ;
6563 } ) ;
6664 } ) ;
67- test ( "EXAMPLE: License expiring tomorrow shows 'expiring tomorrow' " , async ( { driver } ) => {
65+ test ( "EXAMPLE: License expiring tomorrow" , async ( { driver } ) => {
6866 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
6967 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . Subscription , 0 ) ) ;
7068 await driver . goTo ( "/configuration/license" ) ;
@@ -73,7 +71,7 @@ describe("FEATURE: License", () => {
7371 expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "expiring tomorrow" ) ;
7472 } ) ;
7573 } ) ;
76- test ( "EXAMPLE: License expiring today shows 'expiring today' " , async ( { driver } ) => {
74+ test ( "EXAMPLE: License expiring today" , async ( { driver } ) => {
7775 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
7876 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . Subscription , - 1 ) ) ;
7977 await driver . goTo ( "/configuration/license" ) ;
@@ -84,17 +82,17 @@ describe("FEATURE: License", () => {
8482 } ) ;
8583 } ) ;
8684
87- describe ( "RULE: Upgrade Protection license expiring soon must be displayed" , ( ) => {
88- test ( "EXAMPLE: Upgrade Protection license expiring with x days shows 'X days left' " , async ( { driver } ) => {
85+ describe ( "RULE: Upgrade Protection license expiring soon must be displayed with a reference to how much time is left and a warning:'Once upgrade protection expires, you'll no longer have access to support or new product versions. ' " , ( ) => {
86+ test ( "EXAMPLE: Upgrade Protection license expiring in 11 days" , async ( { driver } ) => {
8987 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
9088 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . UpgradeProtection , 10 ) ) ;
9189 await driver . goTo ( "/configuration/license" ) ;
9290 await waitFor ( async ( ) => {
93- expect ( await licenseExpiryDaysLeft ( ) ) . toBeVisible ( ) ; //License expiry date: 2/5/2025 - expiring in 11 days
94- expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "days left" ) ; //License expiry date: 2/5/2025 - expiring in 11 days
91+ expect ( await licenseExpiryDaysLeft ( ) ) . toBeVisible ( ) ;
92+ expect ( ( await licenseExpiryDaysLeft ( ) ) . textContent ) . toContain ( "11 days left" ) ;
9593 } ) ;
9694 } ) ;
97- test ( "EXAMPLE: Upgrade Protection license expiring tomorrow shows 'expiring tomorrow' " , async ( { driver } ) => {
95+ test ( "EXAMPLE: Upgrade Protection license expiring tomorrow" , async ( { driver } ) => {
9896 await driver . setUp ( precondition . serviceControlWithMonitoring ) ;
9997 await driver . setUp ( precondition . hasExpiringLicense ( LicenseType . UpgradeProtection , 0 ) ) ;
10098 await driver . goTo ( "/configuration/license" ) ;
0 commit comments