From 39e2b6d0ad4ab207f58cab1433b827226bcca5ae Mon Sep 17 00:00:00 2001 From: ryan-crabbe-berri Date: Tue, 28 Jul 2026 11:07:50 -0700 Subject: [PATCH] fix(e2e/ui): match the 409 duplicate-user status in the ensure fallback /user/new raises 409 for an existing user, not 400, so the update fallback was unreachable and any rerun against an already-seeded DB would fail setup. Accept either status and let the already-exists body check discriminate --- tests/e2e/ui/globalSetup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/ui/globalSetup.ts b/tests/e2e/ui/globalSetup.ts index ad5a53310e0..648c6503524 100644 --- a/tests/e2e/ui/globalSetup.ts +++ b/tests/e2e/ui/globalSetup.ts @@ -24,7 +24,7 @@ async function ensureDbRoleUser( }); if (created.ok()) return; const body = await created.text(); - if (created.status() === 400 && body.includes("already exists")) { + if ((created.status() === 409 || created.status() === 400) && body.includes("already exists")) { const updated = await api.post(`${baseUrl}/user/update`, { headers: auth, data: { user_id: entry.userId, user_role: entry.dbRole, password },