more-robust-ui-tests #1158

Merged
philipp merged 4 commits from more-robust-ui-tests into main 2025-11-20 19:21:16 +01:00
2 changed files with 6 additions and 1 deletions
Showing only changes of commit 900cb2a24d - Show all commits

View File

@@ -117,6 +117,7 @@ test.describe("cox can edit trips", () => {
// Someone registers...
await page.goto("/auth/logout");
await page.waitForURL("/auth");
await login(page, "rower", "rower");
await page.goto("/planned");
@@ -124,6 +125,7 @@ test.describe("cox can edit trips", () => {
// Login as cox again
await page.goto("/auth/logout");
await page.waitForURL("/auth");
await login(page, "cox", "cox");
await page.goto("/planned");

View File

@@ -12,7 +12,10 @@ export async function login(page: Page, username: string, password: string): Pro
// Clear cookies to ensure clean state
await page.context().clearCookies();
await page.goto("/auth");
// Navigate to auth page and wait for it to fully load
await page.goto("/auth", { waitUntil: 'load' });
await page.waitForLoadState('networkidle');
await page.getByPlaceholder("Name").click();
await page.getByPlaceholder("Name").fill(username);
await page.getByPlaceholder("Passwort").click();