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.
41 lines
1.3 KiB
JavaScript
41 lines
1.3 KiB
JavaScript
import { test, expect } from '@playwright/test'
|
|
|
|
test.describe('coming-soon page', () => {
|
|
test('renders with heading and login form', async ({ page }) => {
|
|
await page.goto('/coming-soon')
|
|
|
|
await expect(page.locator('h1')).toContainText('Ghost Guild')
|
|
await expect(page.locator('input[type="email"]')).toBeVisible()
|
|
await expect(page.getByRole('button', { name: 'Send Magic Link' })).toBeVisible()
|
|
})
|
|
|
|
test('shows "Coming Soon" text for unauthenticated visitors', async ({ page }) => {
|
|
await page.goto('/coming-soon')
|
|
|
|
await expect(page.getByText('Coming Soon')).toBeVisible()
|
|
})
|
|
})
|
|
|
|
test.describe('public routes accessible when gate is off', () => {
|
|
test('home page loads', async ({ page }) => {
|
|
await page.goto('/')
|
|
|
|
// Should not redirect to /coming-soon
|
|
expect(page.url()).not.toContain('/coming-soon')
|
|
await expect(page.locator('h1')).toBeVisible()
|
|
})
|
|
|
|
test('events page loads', async ({ page }) => {
|
|
await page.goto('/events')
|
|
|
|
expect(page.url()).not.toContain('/coming-soon')
|
|
await expect(page.locator('h1')).toContainText('Events')
|
|
})
|
|
|
|
test('join page loads', async ({ page }) => {
|
|
await page.goto('/join')
|
|
|
|
expect(page.url()).not.toContain('/coming-soon')
|
|
await expect(page.locator('h1')).toContainText('Join Ghost Guild')
|
|
})
|
|
})
|