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');