Skip to content

Commit 4e3b63a

Browse files
committed
Fix licensing test by adding flush promises
1 parent 7112d7b commit 4e3b63a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Frontend/test/specs/licensing/trial-license-notifications.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { expect } from "vitest";
33
import { test, describe } from "../../drivers/vitest/driver";
44
import * as precondition from "../../preconditions";
55
import { getTrialBar } from "./questions/trialLicenseBar";
6+
import flushPromises from "flush-promises";
67

78
describe("FEATURE: Trial license notifications", () => {
89
describe("RULE: The user should know they are using a trial license at all times", () => {
@@ -17,6 +18,8 @@ describe("FEATURE: Trial license notifications", () => {
1718
const trialBar = await getTrialBar();
1819
expect(trialBar.textMatches(/non-production use only/i)).toBeTruthy();
1920
expect(trialBar.hasLinkWithCaption("Trial license").address).toBe("#/configuration/license");
21+
22+
await flushPromises();
2023
});
2124
});
2225
});
@@ -31,6 +34,8 @@ describe("FEATURE: Trial license notifications", () => {
3134

3235
//This has to use waitFor because of shared state between test runs. See issue documented issue and proposed solution https://github.com/Particular/ServicePulse/issues/1905
3336
await waitFor(() => expect(screen.queryByRole("status", { name: /trial license bar information/i })).toBeNull());
37+
38+
await flushPromises();
3439
});
3540
});
3641
});

0 commit comments

Comments
 (0)