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
@@ -0,0 +1,50 @@
|
||||
import { test, expect } from './base';
|
||||
import { APP_URL, ID } from '../src/helpers/config';
|
||||
import { login } from '../src/helpers/auth';
|
||||
import { AppPage } from '../src/pages/AppPage';
|
||||
|
||||
/**
|
||||
* §12 Attendee Core Navigation — CONV-ATT-UI-001.
|
||||
*
|
||||
* A successfully admitted attendee can access Home, Agenda, Connections and
|
||||
* Profile. The application must remain associated with the Demo Event, display
|
||||
* the demo timetable, navigate successfully between areas, not produce frontend
|
||||
* errors, and not lose authenticated state during normal navigation.
|
||||
*/
|
||||
test('CONV-ATT-UI-001 an admitted attendee can navigate all areas without errors', async ({ page }) => {
|
||||
const app = new AppPage(page, APP_URL);
|
||||
|
||||
// Collect console + page errors for the report.
|
||||
const errors: string[] = [];
|
||||
page.on('console', (m) => m.type() === 'error' && errors.push(m.text()));
|
||||
page.on('pageerror', (e) => errors.push(`pageerror: ${e.message}`));
|
||||
|
||||
// ATTENDEE_A is a normal attendee (welcome-checked-in at reset).
|
||||
await login(page, APP_URL, ID.attendeeA);
|
||||
await app.waitForAdmitted();
|
||||
|
||||
// Home — the app is associated with the Demo Event.
|
||||
await app.gotoTab('home');
|
||||
await expect(app.eventTitle()).toBeVisible();
|
||||
|
||||
// Agenda — the demo timetable renders.
|
||||
await app.gotoTab('agenda');
|
||||
await expect(app.eventTitle()).toBeVisible();
|
||||
await expect(page.getByText(/slots/)).toBeVisible();
|
||||
|
||||
// Connections — the area renders (My connections tab present).
|
||||
await app.gotoTab('connections');
|
||||
await expect(page.getByTestId('connections-tab-mine')).toBeVisible();
|
||||
|
||||
// Profile — the area renders (save control present).
|
||||
await app.gotoTab('profile');
|
||||
await expect(page.getByTestId('profile-save')).toBeVisible();
|
||||
|
||||
// Authenticated state is not lost during navigation: the tab bar (admitted)
|
||||
// is still present and the user is not re-gated.
|
||||
await expect(page.getByTestId('tab-home')).toBeVisible();
|
||||
expect(await app.isGated()).toBe(false);
|
||||
|
||||
// No frontend errors were produced during navigation.
|
||||
expect(errors, `Uncaught frontend errors: ${errors.join(' | ')}`).toEqual([]);
|
||||
});
|
||||
Reference in new issue
Block a user