Add Playwright e2e coverage and Node 20 pin

This commit is contained in:
chihlasm
2026-03-16 02:28:04 -04:00
parent 357f8e2d08
commit e39819f8d0
27 changed files with 1743 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
import { expect, test } from '@playwright/test'
test.use({ storageState: { cookies: [], origins: [] } })
test.describe('public route smoke tests', () => {
test('landing page loads', async ({ page }) => {
await page.goto('/landing')
await expect(
page.getByRole('link', { name: 'Get Started Free' }),
).toBeVisible()
await expect(
page.getByText('Stop writing ticket notes.'),
).toBeVisible()
})
test('protected routes redirect unauthenticated users to landing', async ({ page }) => {
await page.goto('/sessions')
await expect(page).toHaveURL(/\/landing$/)
await expect(
page.getByRole('link', { name: 'Sign In' }),
).toBeVisible()
})
})