Merge pull request 'test: disambiguate the Email locator in auth.spec' (#22) from fix/auth-spec-email-locator into main
SonarQube Analysis / sonarqube (push) Successful in 5m36s
Tests / backend-unit (push) Successful in 1m31s
Tests / backend-integration (push) Failing after 3h10m32s
Tests / frontend-e2e (push) Failing after 16m17s

Reviewed-on: #22
This commit was merged in pull request #22.
This commit is contained in:
2026-08-15 18:37:38 -05:00
+3 -3
View File
@@ -13,7 +13,7 @@ test.describe('Customer accounts', () => {
test('registers a new account and lands on the account page', async ({ page }) => { test('registers a new account and lands on the account page', async ({ page }) => {
const email = uniqueEmail(); const email = uniqueEmail();
await page.goto('/register'); await page.goto('/register');
await page.getByLabel('Email').fill(email); await page.getByRole('textbox', { name: 'Email' }).fill(email);
await page.getByLabel('Password').fill('supersecret123'); await page.getByLabel('Password').fill('supersecret123');
await page.getByRole('button', { name: 'Create account' }).click(); await page.getByRole('button', { name: 'Create account' }).click();
await expect(page).toHaveURL(/\/account/); await expect(page).toHaveURL(/\/account/);
@@ -23,14 +23,14 @@ test.describe('Customer accounts', () => {
test('rejects login with the wrong password', async ({ page }) => { test('rejects login with the wrong password', async ({ page }) => {
const email = uniqueEmail(); const email = uniqueEmail();
await page.goto('/register'); await page.goto('/register');
await page.getByLabel('Email').fill(email); await page.getByRole('textbox', { name: 'Email' }).fill(email);
await page.getByLabel('Password').fill('supersecret123'); await page.getByLabel('Password').fill('supersecret123');
await page.getByRole('button', { name: 'Create account' }).click(); await page.getByRole('button', { name: 'Create account' }).click();
await expect(page).toHaveURL(/\/account/); await expect(page).toHaveURL(/\/account/);
await page.getByRole('button', { name: 'Log out' }).click(); await page.getByRole('button', { name: 'Log out' }).click();
await page.goto('/login'); await page.goto('/login');
await page.getByLabel('Email').fill(email); await page.getByRole('textbox', { name: 'Email' }).fill(email);
await page.getByLabel('Password').fill('wrong-password'); await page.getByLabel('Password').fill('wrong-password');
await page.getByRole('button', { name: 'Log in' }).click(); await page.getByRole('button', { name: 'Log in' }).click();
await expect(page.getByText('invalid email or password')).toBeVisible(); await expect(page.getByText('invalid email or password')).toBeVisible();