diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 1e3467a..fd6da5a 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -54,7 +54,7 @@ jobs: playwright: name: Web E2E runs-on: [self-hosted, evoo-ci, Linux] - timeout-minutes: 30 + timeout-minutes: 45 concurrency: group: ${{ inputs.publish_report && 'playwright-publication' || 'evoo-self-hosted-heavy' }} cancel-in-progress: false diff --git a/apps/web/e2e/helpers.ts b/apps/web/e2e/helpers.ts index ea65103..78e7b80 100644 --- a/apps/web/e2e/helpers.ts +++ b/apps/web/e2e/helpers.ts @@ -226,14 +226,16 @@ export async function signup( name: string, testInfo?: TestInfo, ) { + const headingTimeout = process.env.CI ? 15_000 : 5_000; + const retryTimeout = process.env.CI ? 120_000 : 45_000; await expect(async () => { await page.goto("/sign-up", { waitUntil: "domcontentloaded" }); await expect( page.getByRole("heading", { name: /Create your evOo|Dein evOo erstellen/i }), ).toBeVisible({ - timeout: 5_000, + timeout: headingTimeout, }); - }).toPass({ timeout: 45_000 }); + }).toPass({ timeout: retryTimeout }); if (testInfo) await captureScreenshot(page, testInfo, "01-sign-up"); await page.getByPlaceholder(/Your name|Dein Name/i).fill(name); await page.getByPlaceholder(/Your email address|Deine E-Mail-Adresse/i).fill(email); diff --git a/apps/web/playwright.config.ts b/apps/web/playwright.config.ts index a51d861..234f30b 100644 --- a/apps/web/playwright.config.ts +++ b/apps/web/playwright.config.ts @@ -1,6 +1,7 @@ import { defineConfig, devices } from "@playwright/test"; import { isRealSandboxProvider } from "./e2e/helpers"; +const ci = Boolean(process.env.CI); const webPort = Number(process.env.WEB_PORT ?? 5173); const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? `http://127.0.0.1:${webPort}`; const realSandbox = isRealSandboxProvider(); @@ -32,6 +33,6 @@ export default defineConfig({ command: "pnpm dev", url: baseURL, reuseExistingServer: !process.env.CI, - timeout: 120_000, + timeout: ci ? 180_000 : 120_000, }, }); diff --git a/packages/testkit/src/cli/harness.ts b/packages/testkit/src/cli/harness.ts index 4c5878a..a1d8383 100644 --- a/packages/testkit/src/cli/harness.ts +++ b/packages/testkit/src/cli/harness.ts @@ -256,7 +256,10 @@ async function main() { port: apiPort, hostname: "127.0.0.1", }); - await waitForHealth(`http://127.0.0.1:${apiPort}/health`, 15_000); + await waitForHealth( + `http://127.0.0.1:${apiPort}/health`, + process.env.CI ? 30_000 : 15_000, + ); try { execSync("rm -rf apps/web/node_modules/.vite node_modules/.vite", {