Accessibility fixes.
This commit is contained in:
parent
4aacb26c4b
commit
88c94aaaf4
12 changed files with 276 additions and 260 deletions
|
|
@ -1,41 +1,45 @@
|
|||
import { test, expect } from '@playwright/test'
|
||||
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')
|
||||
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()
|
||||
})
|
||||
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')
|
||||
test('shows "Coming Soon" text for unauthenticated visitors', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/coming-soon");
|
||||
|
||||
await expect(page.getByText('Coming Soon')).toBeVisible()
|
||||
})
|
||||
})
|
||||
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('/')
|
||||
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.getByText('Ghost Guild')).toBeVisible()
|
||||
})
|
||||
expect(page.url()).not.toContain("/coming-soon");
|
||||
await expect(page.locator("h1")).toContainText("Ghost Guild");
|
||||
});
|
||||
|
||||
test('events page loads', async ({ page }) => {
|
||||
await page.goto('/events')
|
||||
test("events page loads", async ({ page }) => {
|
||||
await page.goto("/events");
|
||||
|
||||
expect(page.url()).not.toContain('/coming-soon')
|
||||
await expect(page.locator('h1')).toContainText('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')
|
||||
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')
|
||||
})
|
||||
})
|
||||
expect(page.url()).not.toContain("/coming-soon");
|
||||
await expect(page.locator("h1")).toContainText("Join Ghost Guild");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue