Page MenuHomeSealhub

No OneTemporary

diff --git a/tests/admin.test.ts b/tests/admin.test.ts
index 1a46700..34130dd 100644
--- a/tests/admin.test.ts
+++ b/tests/admin.test.ts
@@ -1,35 +1,39 @@
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);
await page.getByRole("link", { name: "Go to Admin" }).click();
await page.getByPlaceholder("text").click();
await page.getByPlaceholder("text").fill("admin");
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 }) => {
await page.getByRole("link", { name: "Edit Navbar" }).click();
await page.getByRole("link", { name: "Create" }).click();
await page.getByLabel("label").click();
await page.getByLabel("label").fill("Homepage");
await page.getByLabel("href").fill("/");
await page.getByRole("button", { name: "Wyślij" }).click();
await page.getByRole("link", { name: "Homepage" }).click();
await expect(page).toHaveScreenshot();
});
test("Basic flow of creating a page", async ({ page, backend }) => {
await page.getByRole("link", { name: "Edit Pages" }).click();
await page.getByRole("link", { name: "Create" }).click();
await page.getByLabel("url").click();
await page.getByLabel("url").fill("/my-page/");
await page.getByLabel("title").fill("My Page");
await page.getByLabel("heading").fill("My Heading");
await page.getByLabel("description").fill("My Description");
await page.getByRole("button", { name: "Wyślij" }).click();
await page.goto(`${backend.url}/my-page/`);
await expect(page).toHaveScreenshot();
});

File Metadata

Mime Type
text/x-diff
Expires
Sat, Nov 8, 11:13 (20 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1034504
Default Alt Text
(1 KB)

Event Timeline