commit 1c8594ad96f88d5bb79e97cee58d465bc11f5d57 Author: tisachi Date: Fri Sep 4 19:06:19 2026 +0200 Baseline: stan przed refaktoryzacja struktury diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..de186b0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +node_modules/ +dist/ +.env +*.log +.DS_Store +.vite/ +test-results/ +playwright-report/ +blob-report/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..8465d4d --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,32 @@ +# FitOS — zasady pracy z kodem + +## Struktura +- `app` (React+Vite, 5173), `admin` (React+Vite, 5174), `api` (Express+Prisma+PostgreSQL, 9002). + +## Testy — obowiązkowe po każdej zmianie +- `app`/`admin`: `npm test` (vitest), `npm run test:e2e` (Playwright, API mockowane, dev server sam). `api`: `npm test` (unit+integration, supertest). +- Testy aktualizujesz w tej samej zmiance co kod. Zmiana UI → najpierw grep starych tekstów/selectorów w testach. +- e2e: `import { test } from './fixtures'` (NIE `@playwright/test`) — guard FAIL przy `console.error`/`pageerror`; wyjątek: `allowConsoleError(page, /re/)` + komentarz. Ignorowane: 401. 403/404/5xx = FAIL. +- e2e bez API/DB: `mockApi(page, ...)` z `e2e/mock-api.ts`. Nowe pliki: `e2e/.spec.ts`, opisy PL. +- Selektory: `getByRole`/`getByText`/`input[type=...]` — `getByLabel` NIE działa (`Field` bez `