Address e2e review feedback

- 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 <noreply@anthropic.com>
This commit is contained in:
silverwind
2026-02-18 03:03:15 +01:00
co-authored by Claude Opus 4.6
parent 6ea6c37762
commit e9e676d553
3 changed files with 6 additions and 2 deletions
+3
View File
@@ -47,6 +47,9 @@ jobs:
HTTP_PORT = 3000
ROOT_URL = http://localhost:3000
[service]
ENABLE_CAPTCHA = false
[security]
INSTALL_LOCK = true
EOF
+2 -2
View File
@@ -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();
}
+1
View File
@@ -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