Files
ketopath/apps/web/e2e/home.spec.ts
T
lucianoandClaude Opus 4.7 a3109d2a6c test: setup Vitest workspace and Playwright with first nutrition tests
Vitest:
- Workspace at root (vitest.workspace.ts) running per-package configs
- packages/shared/vitest.config.ts with v8 coverage and 70% thresholds
- Root scripts: test / test:watch / test:coverage

Nutrition module in @ketopath/shared:
- calculateBmr (Mifflin-St Jeor) + calculateTdee with activity multipliers
- ACTIVITY_MULTIPLIERS constants matching CLAUDE.md domain knowledge
- 14 unit tests covering Michele/Laura PRD personas, all sex variants,
  every activity level, and input validation (100% coverage on src/nutrition)

Playwright in apps/web:
- chromium-only project, webServer auto-boot of pnpm dev
- e2e/home.spec.ts smoke test asserts Italian copy and disclaimer

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 12:32:55 +02:00

12 lines
537 B
TypeScript

import { expect, test } from '@playwright/test';
test('home page renders Italian copy and CTAs', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(/KetoPath/);
await expect(page.getByRole('heading', { name: 'KetoPath' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Inizia gratis' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Scopri come funziona' })).toBeVisible();
await expect(page.getByText(/non sostituiscono il parere di un medico/)).toBeVisible();
});