The keycloak smoke check now asserts that a password-only grant on the medewerker realm is rejected and that a TOTP code completes it. The e2e medewerker logins move to a shared helper that submits Keycloak's OTP challenge. Both fail against the current realm export, which enforces no MFA. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
22 lines
1.2 KiB
TypeScript
22 lines
1.2 KiB
TypeScript
import { expect, test } from '@playwright/test';
|
|
import { loginMedewerker } from './medewerker-login';
|
|
|
|
// S-15a walking skeleton: a beheerder logs in to the beheer portal (medewerker realm) and sees the
|
|
// read-only ZTC catalogus. The verify stack seeds and publishes the BIG-REGISTRATIE zaaktype (the
|
|
// same one verify-domain relies on), so it must appear in the catalogus. Runs against the shared
|
|
// verify stack, so it asserts on that stable seeded zaaktype rather than anything test-specific.
|
|
test('a beheerder sees the published zaaktypen in the catalogus', async ({ page }) => {
|
|
await page.goto('http://beheer/');
|
|
|
|
// The beheer portal redirects to the Keycloak medewerker realm login (same realm as behandel),
|
|
// which enforces MFA: password, then a TOTP code.
|
|
await loginMedewerker(page, 'bram-beheerder');
|
|
|
|
await expect(page.getByRole('heading', { name: /Catalogus/i })).toBeVisible();
|
|
|
|
// The seeded, published BIG zaaktype is shown by its business identificatie. Match the cell
|
|
// exactly (case-sensitive): getByText is case-insensitive, so it would also match the omschrijving
|
|
// cell "BIG-registratie" and trip strict mode.
|
|
await expect(page.getByRole('cell', { name: 'BIG-REGISTRATIE', exact: true })).toBeVisible();
|
|
});
|