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.
This commit is contained in:
1 parent
e4c8815e52
commit
692df23149
44 files changed
+3715
-26
No files matched your search
@@ -53,14 +53,16 @@ export function Toggle({
|
||||
checked,
|
||||
onChange,
|
||||
label,
|
||||
testId,
|
||||
}: {
|
||||
checked: boolean;
|
||||
onChange: (v: boolean) => void;
|
||||
label: string;
|
||||
testId?: string;
|
||||
}) {
|
||||
return (
|
||||
<label className="toggle">
|
||||
<input type="checkbox" checked={checked} onChange={(e) => onChange(e.target.checked)} />
|
||||
<input type="checkbox" data-testid={testId} checked={checked} onChange={(e) => onChange(e.target.checked)} />
|
||||
<span className="track">
|
||||
<span className="knob" />
|
||||
</span>
|
||||
@@ -160,11 +162,12 @@ export function Scanner({ onResult, label = 'Scan a lanyard QR' }: { onResult: (
|
||||
<div className="row" style={{ gap: 8 }}>
|
||||
<input
|
||||
className="input mono"
|
||||
data-testid="scanner-manual-code"
|
||||
placeholder="…or type the code (e.g. CVV-XXX-NNNN)"
|
||||
value={manual}
|
||||
onChange={(e) => setManual(e.target.value)}
|
||||
/>
|
||||
<button className="btn primary small" disabled={!manual.trim()} onClick={() => onResult(manual.trim())}>
|
||||
<button className="btn primary small" data-testid="scanner-manual-go" disabled={!manual.trim()} onClick={() => onResult(manual.trim())}>
|
||||
Go
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user