Files
register-referentie/tests/e2e/default-fill.spec.ts
T
not d74270b0bd
CI / build (pull_request) Successful in 1m19s
CI / lint (pull_request) Successful in 1m32s
CI / unit (pull_request) Successful in 1m49s
CI / frontend (pull_request) Successful in 3m44s
CI / mutation (pull_request) Successful in 6m29s
CI / verify-stack (pull_request) Successful in 15m53s
docs+test(e2e): ADR-0026, S-15b demo note, default-fill e2e (refs #131)
2026-07-24 15:45:18 +02:00

27 lines
1.2 KiB
TypeScript

import { expect, test } from '@playwright/test';
// S-15b: a beheerder edits the ACL default-fill in the beheer portal and gets a saved confirmation.
// Runs against the shared verify stack; it edits + saves (the ACL store is in-memory, ADR-0026) and
// asserts the confirmation, without depending on another test's state.
test('a beheerder edits and saves the default-fill', async ({ page }) => {
await page.goto('http://beheer/');
// Keycloak medewerker-realm login (same realm as behandel).
await page.locator('#username').fill('bram-beheerder');
await page.locator('#password').fill('test123');
await page.locator('#kc-login').click();
await expect(page.getByRole('heading', { name: /Catalogus/i })).toBeVisible();
// Navigate to the default-fill editor and change a value.
await page.getByRole('link', { name: /Default-fill/i }).click();
await expect(page.getByRole('heading', { name: /Default-fill/i })).toBeVisible();
const bron = page.getByLabel('Bronorganisatie');
await expect(bron).toBeVisible();
await bron.fill('517439943');
await page.getByRole('button', { name: /Opslaan/i }).click();
await expect(page.getByText(/standaardwaarden zijn opgeslagen/i)).toBeVisible();
});