From 189de78203be6b07c81622a4b641144352d8a82b Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Sat, 14 Feb 2026 21:16:58 -0800 Subject: feat: add username field to login for better password manager support --- frontend/tests/auth.spec.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'frontend/tests') diff --git a/frontend/tests/auth.spec.ts b/frontend/tests/auth.spec.ts index 4161a83..33ada85 100644 --- a/frontend/tests/auth.spec.ts +++ b/frontend/tests/auth.spec.ts @@ -26,11 +26,8 @@ test.describe('Authentication - No Password Required', () => { // Visit login page await page.goto('/v2/login'); - // Submit with empty password - const passwordInput = page.getByLabel(/password/i); - await expect(passwordInput).toBeVisible(); - - // Leave password empty and submit + // Fill username and submit with empty password + await page.fill('input[id="username"]', 'neko'); await page.click('button[type="submit"]'); // Should redirect to dashboard @@ -68,6 +65,7 @@ test.describe('Authentication - Password Required', () => { await page.goto('/v2/login'); // Enter wrong password + await page.fill('input[id="username"]', 'neko'); await page.fill('input[type="password"]', 'wrongpassword'); await page.click('button[type="submit"]'); @@ -82,6 +80,7 @@ test.describe('Authentication - Password Required', () => { await page.goto('/v2/login'); // Enter correct password (must match what the server was started with) + await page.fill('input[id="username"]', 'neko'); await page.fill('input[type="password"]', 'testpass'); await page.click('button[type="submit"]'); @@ -94,6 +93,7 @@ test.describe('Authentication - Password Required', () => { test.skip('should persist authentication across page reloads', async ({ page }) => { // Login first await page.goto('/v2/login'); + await page.fill('input[id="username"]', 'neko'); await page.fill('input[type="password"]', 'testpass'); await page.click('button[type="submit"]'); await expect(page).toHaveURL(/.*\/v2\/?$/); @@ -109,6 +109,7 @@ test.describe('Authentication - Password Required', () => { test.skip('should logout and redirect to login page', async ({ page }) => { // Login first await page.goto('/v2/login'); + await page.fill('input[id="username"]', 'neko'); await page.fill('input[type="password"]', 'testpass'); await page.click('button[type="submit"]'); await expect(page).toHaveURL(/.*\/v2\/?$/); -- cgit v1.2.3