test(e2e): shared Actors/SeedRefs/loginAs, kill duplicated magic strings (WP-70)
The demo BSN, password, and DigiD login sequence were copy-pasted verbatim into all three specs; the diploma id #diploma-d1 was coupled to SeedData.cs's ordering by comment only, with no compile-time check if the seed shape changed. e2e/support/actors.ts names both: Actors.zorgverlener + loginAs() for the login sequence, SeedRefs.diplomaZonderPolicyVragen for the seed coupling (with the "why d1" reasoning attached to the name, not scattered across specs). Zero assertions changed — pure extract-and-rename of test setup. e2e test-isolation (the shared mutable backend) is a documented follow-up, not fixed here — see ADR-0006. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { Actors, loginAs } from './support/actors';
|
||||
|
||||
// One flow through both Brief v2 axes on the real FE+backend (WP-19 conventions):
|
||||
// content (drafter composes via the besluit panel → approver approves → sends) and
|
||||
@@ -11,10 +12,7 @@ import { expect, test } from '@playwright/test';
|
||||
// the org-template draft it edits (step 8) and never asserts an absolute version
|
||||
// number — only that it increased by exactly one.
|
||||
test('drafter composes → approver sends; admin republishes appearance', async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
await page.getByLabel('BSN').fill('123456782');
|
||||
await page.getByLabel('Wachtwoord').fill('demo');
|
||||
await page.getByRole('button', { name: 'Inloggen met DigiD' }).click();
|
||||
await loginAs(page, Actors.zorgverlener);
|
||||
await expect(page).toHaveURL(/\/dashboard$/);
|
||||
|
||||
// --- Compose (drafter) ---
|
||||
|
||||
Reference in New Issue
Block a user