Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F10361107
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
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
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Nov 8, 11:13 (14 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1034504
Default Alt Text
(1 KB)
Attached To
Mode
rPLAY Sealious playground
Attached
Detach File
Event Timeline
Log In to Comment