From 4b84c48413f51b9f6423565817c85acd30d9d7e9 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Fri, 6 Mar 2026 15:59:18 -0600 Subject: [PATCH] fix: e2e test login form selectors - Use specific email field ID to avoid ambiguity between password and magic link forms - Use case-insensitive regex for 'Log in' button text --- e2e/tests/auth.setup.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/tests/auth.setup.ts b/e2e/tests/auth.setup.ts index 4dd22db2..b12aa90b 100644 --- a/e2e/tests/auth.setup.ts +++ b/e2e/tests/auth.setup.ts @@ -31,12 +31,12 @@ setup('authenticate', async ({ page }) => { // Navigate to login page await page.goto('/users/log-in'); - // Fill in email and password - await page.getByLabel('Email').fill(email); + // Fill in email and password (use the password form, not magic link) + await page.locator('#user_email_password').fill(email); await page.getByLabel('Password').fill(password); // Submit login form - await page.getByRole('button', { name: 'Sign in' }).click(); + await page.getByRole('button', { name: /log in/i }).click(); // Wait for TOTP page await page.waitForURL('**/users/log-in/totp');