Quickstart: Validate Post-Migration Gaps¶
Prerequisites¶
- PostgreSQL test database available to
prontuare-api. - API and web environment files configured with matching origins.
- Dependencies already installed in both isolated repositories.
- Deterministic fixture with owner A, owner B, active/inactive patients and appointments at day/month boundaries.
1. Static and API verification¶
cd prontuare-api
bun run typecheck
bun test test/calendar.integration.test.ts test/dashboard.integration.test.ts
cd ../prontuare-web
pnpm typecheck
pnpm build
Expected: all commands pass; dashboard tests prove owner isolation, cancelled exclusion, timezone boundaries and unavailable metrics; calendar tests prove range validation, ordering and minimum patient display data.
2. Run the vertical slice¶
Start API and web with their documented local commands, load the deterministic fixture, then run:
cd prontuare-web
pnpm exec playwright test tests/calendar-dashboard.spec.ts
Expected browser evidence:
/calendaropens the current month and shows only owner A events.- Month/week/previous/next/today controls load correct ranges.
- Overlapping and boundary events are separately accessible by keyboard.
- Narrow viewport uses a readable chronological alternative.
- Event selection reaches existing edit/cancel flow; empty slot/create action carries a date when supported.
/calendar/settingsretains connection controls and OAuth feedback.- Dashboard shows real patient/appointment totals and explicit unavailable states for documents/revenue.
- API failure clears no value into a false zero and retry succeeds.
3. Performance check¶
Capture API timings for representative calendar and dashboard requests with the fixture. Verify p95 under 200 ms and browser-visible result/state within 2 seconds. Record dataset size and machine context with evidence.
4. Governance review¶
Review contracts/external-lookups-decision.md with the owner. The feature can close only when CEP, CNPJ and CFP rows have an approved decision. If any is adopt or replace, create a new spec before changing code or configuration.
Evidence report¶
Report commands, pass/fail counts, browser viewport/keyboard coverage, untested items and reasons. Do not describe the feature as deploy-ready without the real local browser flow required by the constitution.