Files
Convivo/e2e/tests/base.ts
T
Lago 692df23149 Add Playwright E2E suite (46 tests) + app testids + test_cases.md
- e2e/: full Playwright suite covering every spec case (staff auth/UI,
  welcome + session check-in, attendee access/gating, connections,
  profile visibility, speaker material, sponsor, feedback, E2E journeys,
  role security matrix). 46/46 passing.
- apps/convivo: add data-testid attributes (gate, tabs, scanner, toggles)
  to support the E2E suite.
- test_cases.md: spec-case-to-test coverage map (all cases fully covered).
- .gitignore: ignore e2e node_modules/reports/test-results.
2026-09-09 10:13:26 +02:00

28 lines
702 B
TypeScript

import { test as base, expect } from '@playwright/test';
import { resetAll } from '../src/helpers/reset';
/**
* Shared fixture: resets the demo rows the suite touches before every test, so
* tests are self-contained and execution order never matters (spec §3).
*
* Multi-user tests use the built-in `browser` fixture to create isolated
* `BrowserContext`s (one per user) so real-time behaviour is observed naturally
* (spec §2, §40).
*/
type Fixtures = {
/** Auto: reset state before the test. */
reset: void;
};
export const test = base.extend<Fixtures>({
reset: [
async ({}, use) => {
resetAll();
await use();
},
{ auto: true },
],
});
export { expect };