From e9e676d55369f97c7fc72f185b49e844d2296983 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 16 Feb 2026 03:02:38 +0100 Subject: [PATCH] Address e2e review feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add ENABLE_CAPTCHA=false to CI app.ini so the server starts with CAPTCHA disabled instead of relying on env var in test script - Retry on 502/503 in addition to 500 in apiRetry helper - Fix typo: workarkound → workaround - Add comment about section-unaware INI parsing in test-e2e.sh Co-Authored-By: Claude Opus 4.6 --- .github/workflows/pull-e2e-tests.yml | 3 +++ tests/e2e/utils.ts | 4 ++-- tools/test-e2e.sh | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-e2e-tests.yml b/.github/workflows/pull-e2e-tests.yml index c40d0b85e7..273a5e07fe 100644 --- a/.github/workflows/pull-e2e-tests.yml +++ b/.github/workflows/pull-e2e-tests.yml @@ -47,6 +47,9 @@ jobs: HTTP_PORT = 3000 ROOT_URL = http://localhost:3000 + [service] + ENABLE_CAPTCHA = false + [security] INSTALL_LOCK = true EOF diff --git a/tests/e2e/utils.ts b/tests/e2e/utils.ts index aa3bd48256..4204cf0b84 100644 --- a/tests/e2e/utils.ts +++ b/tests/e2e/utils.ts @@ -15,7 +15,7 @@ async function apiRetry(fn: () => Promise<{ok: () => boolean; status: () => numb for (let attempt = 0; attempt < maxAttempts; attempt++) { const response = await fn(); if (response.ok()) return; - if (response.status() === 500 && attempt < maxAttempts - 1) { + if ([500, 502, 503].includes(response.status()) && attempt < maxAttempts - 1) { const jitter = Math.random() * 500; await new Promise((resolve) => globalThis.setTimeout(resolve, 1000 * (attempt + 1) + jitter)); continue; @@ -57,7 +57,7 @@ export async function login(page: Page) { } export async function logout(page: Page) { - await page.context().clearCookies(); // workarkound issues related to fomantic dropdown + await page.context().clearCookies(); // workaround issues related to fomantic dropdown await page.goto('/'); await expect(page.getByRole('link', {name: 'Sign In'})).toBeVisible(); } diff --git a/tools/test-e2e.sh b/tools/test-e2e.sh index 648d5255b6..b5463d7cf5 100755 --- a/tools/test-e2e.sh +++ b/tools/test-e2e.sh @@ -10,6 +10,7 @@ if [ -z "${E2E_URL:-}" ]; then echo " E2E_URL=http://localhost:3000 make test-e2e" >&2 exit 1 fi + # Note: this does not respect INI sections, assumes ROOT_URL only appears under [server] ROOT_URL=$(sed -n 's/^ROOT_URL\s*=\s*//p' "$INI_FILE" | tr -d '[:space:]') if [ -z "$ROOT_URL" ]; then echo "error: ROOT_URL not found in $INI_FILE" >&2