fix: add sleep to wait for page to load
This commit is contained in:
parent
47120c40b0
commit
1bdc1e0dbb
1 changed files with 3 additions and 0 deletions
|
@ -24,8 +24,11 @@ test("Create admin fixture @setup", async ({ page }) => {
|
||||||
await page.getByLabel("Confirm Password").fill(admin.password);
|
await page.getByLabel("Confirm Password").fill(admin.password);
|
||||||
await page.getByRole("button", { name: "Register Account" }).click();
|
await page.getByRole("button", { name: "Register Account" }).click();
|
||||||
|
|
||||||
|
await new Promise(r => setTimeout(r, 3000));
|
||||||
await page.waitForURL(config.INSTANCE_URL.toString());
|
await page.waitForURL(config.INSTANCE_URL.toString());
|
||||||
|
|
||||||
|
await page.locator(".positive > p:nth-child(1)").waitFor();
|
||||||
|
|
||||||
expect(page.locator(".positive > p:nth-child(1)")).toContainText(
|
expect(page.locator(".positive > p:nth-child(1)")).toContainText(
|
||||||
"Account was successfully created. Welcome!"
|
"Account was successfully created. Welcome!"
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue