import { expect, test } from '@playwright/test'; // Walking-skeleton happy path (S-08d): a zorgprofessional logs in via mock DigiD and submits a // registration through the self-service portal → BFF → domain. The confirmation shows the reference. test('DigiD login → submit → confirmation', async ({ page }) => { // Visiting the guarded page redirects to the Keycloak (mock DigiD) login. await page.goto('/'); // Keycloak's default login form (stable ids across themes). await page.locator('#username').fill('jan-burger'); await page.locator('#password').fill('test123'); await page.locator('#kc-login').click(); // Back on the portal, authenticated. await expect(page.getByRole('heading', { name: /Zelfservice/i })).toBeVisible(); await page.getByRole('button', { name: /indienen/i }).click(); // The BFF accepted it and the page shows the confirmation. await expect(page.getByText(/ontvangen/i)).toBeVisible(); });