import { expect, test } from '@playwright/test'; import { loginMedewerker } from './keycloak-login'; // 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) — password + enforced TOTP. await loginMedewerker(page, 'bram-beheerder'); 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(); });