mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 13:00:10 +02:00
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:
1 parent
6ea6c37762
commit
e9e676d553
3 files changed
+6
-2
No files matched your search
+2
-2
@@ -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();
|
||||
}
|
||||
Reference in new issue
Block a user