test(e2e): tolerate cold CI startup for signup and Playwright
Self-hosted runs can compile Vite and warm the API slowly after image validate; extend health, dev-server, signup, and job timeouts so Product CI is not cancelled mid-suite. Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
This commit is contained in:
parent
0ed0a2d9bb
commit
cb759100bd
2
.github/workflows/playwright.yml
vendored
2
.github/workflows/playwright.yml
vendored
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
@ -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", {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user