fix: accessibility improvements and test infrastructure hardening

Add aria-labels to form controls (selects, checkboxes, switches), set
html lang attribute and page title, fix color contrast for --candle-dim
and --text-faint tokens, underline inline links, remove opacity hack.
Harden dev login endpoints with atomic findOneAndUpdate and tokenVersion
in JWT. Update Playwright timeouts and E2E test helpers.
This commit is contained in:
Jennie Robinson Faber 2026-04-05 21:59:02 +01:00
parent 61c16d8bac
commit c40f2c7c63
35 changed files with 787 additions and 173 deletions

View file

@ -4,14 +4,15 @@ test.describe('Member dashboard', () => {
test('dashboard loads for authenticated user', async ({ adminPage }) => {
await adminPage.goto('/member/dashboard')
await expect(adminPage.getByText('Welcome back')).toBeVisible({ timeout: 10000 })
// Welcome heading includes the member's name (inside ClientOnly, may take time)
await expect(adminPage.getByText('Welcome back')).toBeVisible({ timeout: 15000 })
})
test('shows navigation links', async ({ adminPage }) => {
await adminPage.goto('/member/dashboard')
// Wait for dashboard content to render
await expect(adminPage.getByText('Welcome back')).toBeVisible({ timeout: 10000 })
// Wait for ClientOnly dashboard content to render
await expect(adminPage.getByText('Welcome back')).toBeVisible({ timeout: 15000 })
// Verify quick action links are present
await expect(adminPage.getByText('Update your profile')).toBeVisible()
@ -25,9 +26,9 @@ test.describe('Member dashboard', () => {
await page.goto('/member/dashboard')
// Should show the sign-in required message or a login modal
// Should show the login modal or the page's sign-in required state
await expect(
page.getByText('Sign in required').or(page.getByText('Sign in to your dashboard'))
page.locator('.modal-title').or(page.getByText('Sign in required'))
).toBeVisible({ timeout: 10000 })
await context.close()