diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-14 21:16:58 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-14 21:16:58 -0800 |
| commit | 189de78203be6b07c81622a4b641144352d8a82b (patch) | |
| tree | 41562388a7bfc9460da3b76830433e7af30e9325 /frontend/tests | |
| parent | 25f817030dc2bf2c8d53f7c57c17a387263be667 (diff) | |
| download | neko-189de78203be6b07c81622a4b641144352d8a82b.tar.gz neko-189de78203be6b07c81622a4b641144352d8a82b.tar.bz2 neko-189de78203be6b07c81622a4b641144352d8a82b.zip | |
feat: add username field to login for better password manager support
Diffstat (limited to 'frontend/tests')
| -rw-r--r-- | frontend/tests/auth.spec.ts | 11 |
1 files changed, 6 insertions, 5 deletions
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\/?$/); |
