@@ -5,6 +5,7 @@ import { expiredLicenseMessageWithValue } from "./questions/expiredLicenseMessag
55import { viewYourLicenseButton } from "./questions/viewYourLicenseButton" ;
66import { extendYourLicenseButton } from "./questions/extendYourLicenseButton" ;
77import { getAlertNotifications } from "./questions/alertNotifications" ;
8+ import flushPromises from "flush-promises" ;
89
910describe ( "FEATURE: EXPIRING license detection" , ( ) => {
1011 describe ( "RULE: The user should be alerted while using the monitoring endpoint list functionality about an EXPIRING license" , ( ) => {
@@ -21,6 +22,7 @@ describe("FEATURE: EXPIRING license detection", () => {
2122 expect ( notification ) . not . toBeUndefined ( ) ;
2223 expect ( notification ?. hasLink ( { caption : "Extend your license" , address : licenseExtensionUrl } ) ) . toBeTruthy ( ) ;
2324 expect ( notification ?. hasLink ( { caption : "View license details" , address : "#/configuration" } ) ) . toBeTruthy ( ) ;
25+ await flushPromises ( ) ;
2426 } ) ;
2527 } ) ;
2628
@@ -39,6 +41,7 @@ describe("FEATURE: EXPIRING license detection", () => {
3941
4042 expect ( notification ) . not . toBeUndefined ( ) ;
4143 expect ( notification ?. hasLink ( { caption : "View license details" , address : "#/configuration" } ) ) . toBeTruthy ( ) ;
44+ await flushPromises ( ) ;
4245 } ) ;
4346 } ) ;
4447 } ) ;
@@ -64,6 +67,7 @@ describe("FEATURE: EXPIRED license detection", () => {
6467
6568 expect ( notification ) . not . toBeUndefined ( ) ;
6669 expect ( notification ?. hasLink ( { caption : "http://particular.net/support" , address : "http://particular.net/support" } ) ) . toBeTruthy ( ) ;
70+ await flushPromises ( ) ;
6771 } ) ;
6872
6973 test ( "EXAMPLE: Expired platform subscription" , async ( { driver } ) => {
@@ -83,6 +87,7 @@ describe("FEATURE: EXPIRED license detection", () => {
8387
8488 expect ( notification ) . not . toBeUndefined ( ) ;
8589 expect ( notification ?. hasLink ( { caption : "http://particular.net/support" , address : "http://particular.net/support" } ) ) . toBeTruthy ( ) ;
90+ await flushPromises ( ) ;
8691 } ) ;
8792
8893 test ( "EXAMPLE: Expired upgrade protection" , async ( { driver } ) => {
@@ -101,6 +106,7 @@ describe("FEATURE: EXPIRED license detection", () => {
101106
102107 expect ( notification ) . not . toBeUndefined ( ) ;
103108 expect ( notification ?. hasLink ( { caption : "http://particular.net/support" , address : "http://particular.net/support" } ) ) . toBeTruthy ( ) ;
109+ await flushPromises ( ) ;
104110 } ) ;
105111 } ) ;
106112} ) ;
0 commit comments