mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-01 00:37:42 +09:00
Introduce a `GITEA_TEST_E2E_TIMEOUT_FACTOR` env var (3 on CI, 1 locally, overridable) to scale Playwright e2e timeouts, fixing flaky tests like `logout propagation` that timed out waiting for SSE event propagation on slow CI runners. | Timeout | Before (local) | After (local) | Before (CI) | After (CI) | |---|---|---|---|---| | expect | 3000 | 5000 | 6000 | 15000 | | action | 3000 | 5000 | 6000 | 15000 | | test | 6000 | 10000 | 12000 | 30000 | | navigation | 6000 | 10000 | 12000 | 30000 | --- This PR was written with the help of Claude Opus 4.6 --------- Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
import {env} from 'node:process';
import {test, expect} from '@playwright/test';
import {apiCreateRepo, apiDeleteRepo} from './utils.ts';
test('repo readme', async ({page}) => {
const repoName = `e2e-readme-${Date.now()}`;
await apiCreateRepo(page.request, {name: repoName});
await page.goto(`/${env.GITEA_TEST_E2E_USER}/${repoName}`);
await expect(page.locator('#readme')).toContainText(repoName);
await apiDeleteRepo(page.request, env.GITEA_TEST_E2E_USER, repoName);
});