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:
parent
b3ee1e5bcb
commit
4b84c48413
1 changed files with 3 additions and 3 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue