From 910c51d01fe76043831e41b1f527216fba784285 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Fri, 1 May 2026 08:32:51 +0200 Subject: [PATCH] fix ci --- frontend/playwright.config.ts | 1 + frontend/tests/helpers.ts | 15 ++------------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts index 520a154..844cfc4 100644 --- a/frontend/playwright.config.ts +++ b/frontend/playwright.config.ts @@ -11,6 +11,7 @@ import { defineConfig, devices } from '@playwright/test'; */ export default defineConfig({ testDir: './tests', + timeout: process.env.CI ? 120000 : 30000, /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ diff --git a/frontend/tests/helpers.ts b/frontend/tests/helpers.ts index ce590d3..ebb4693 100644 --- a/frontend/tests/helpers.ts +++ b/frontend/tests/helpers.ts @@ -9,21 +9,10 @@ export async function resetDatabase(): Promise { } export async function login(page: Page, username: string, password: string): Promise { - // Clear cookies to ensure clean state await page.context().clearCookies(); - - // 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(); await page.getByPlaceholder("Passwort").fill(password); - - // Wait for navigation after form submission - await Promise.all([ - page.waitForURL(/\/(planned|log|$)/, { timeout: 10000 }), - page.getByPlaceholder("Passwort").press("Enter") - ]); + await page.getByPlaceholder("Passwort").press("Enter"); + await page.waitForURL(/\/(planned|log|$)/); }