Admin test: wait for cookies to be set
This commit is contained in:
parent
36dbe94113
commit
8ed2095c33
@ -1,4 +1,5 @@
|
||||
import { test, expect } from "./backend-fixture.js";
|
||||
import { setTimeout as sleep } from "node:timers/promises";
|
||||
|
||||
test.beforeEach(async ({ page, backend }) => {
|
||||
await page.goto(backend.url);
|
||||
@ -8,6 +9,9 @@ test.beforeEach(async ({ page, backend }) => {
|
||||
await page.getByPlaceholder("text").press("Tab");
|
||||
await page.getByPlaceholder("password").fill("adminadmin");
|
||||
await page.getByRole("button", { name: "Wyślij" }).click();
|
||||
while (JSON.stringify(await page.context().cookies()) == "[]") {
|
||||
await sleep(200);
|
||||
}
|
||||
});
|
||||
|
||||
test("Basic flow of adding a navbar link", async ({ page }) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user