Add testing strategy: Vitest for unit tests, Playwright for E2E

- Vitest: unit tests for packages, components, and app logic (jsdom env,
  @testing-library/react, co-located test files)
- Playwright: E2E browser tests per app (journal.test.ts, planner.test.ts),
  auto-starts dev servers, scoped via testMatch
- Sample unit test for types package
- Smoke E2E tests for both apps
- Updated CLAUDE.md with test commands and strategy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-03-22 12:36:09 +01:00
parent 4fac18c165
commit 40b9c425a0
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
11 changed files with 873 additions and 6 deletions

9
e2e/journal.test.ts Normal file
View file

@ -0,0 +1,9 @@
import { test, expect } from "@playwright/test";
test.describe("Journal", () => {
test("loads the home page", async ({ page }) => {
await page.goto("/");
await expect(page).toHaveTitle("trails.cool");
await expect(page.getByText("Your outdoor activity journal")).toBeVisible();
});
});

9
e2e/planner.test.ts Normal file
View file

@ -0,0 +1,9 @@
import { test, expect } from "@playwright/test";
test.describe("Planner", () => {
test("loads the home page", async ({ page }) => {
await page.goto("/");
await expect(page).toHaveTitle("trails.cool Planner");
await expect(page.getByText("Collaborative route planning")).toBeVisible();
});
});