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
This commit is contained in:
Graham McIntire 2026-03-06 15:59:18 -06:00
parent b3ee1e5bcb
commit 4b84c48413
No known key found for this signature in database

View file

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