Adds Playwright E2E and Vitest test infrastructure
Some checks failed
Lint / Lint and Check (push) Failing after 48s
Some checks failed
Lint / Lint and Check (push) Failing after 48s
Integrates Playwright for end-to-end browser testing with automated web server setup, example smoke tests, and CI-compatible configuration. Introduces Vitest, Testing Library, and related utilities for fast component and unit testing. Updates scripts, development dependencies, and lockfile to support both test suites. Establishes unified testing commands for local and CI workflows, laying groundwork for comprehensive automated UI and integration coverage.
This commit is contained in:
14
tests/e2e/smoke.spec.ts
Normal file
14
tests/e2e/smoke.spec.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test('landing page loads and has create account button', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await expect(page.getByRole('heading', { name: 'Track Every Day' })).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: 'Start Tracking Now' })).toBeVisible();
|
||||
});
|
||||
|
||||
test('can navigate to login input', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await page.getByRole('button', { name: 'I Have a Token' }).click();
|
||||
await expect(page.getByLabel('Access Token')).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user