Publish curated Knowledge Hub source from 33cc04fb0ba8ce2b64e4ba3c4b91e6743695cf63

This commit is contained in:
Public Source Publisher committed 2026-10-04 18:31:43 +00:00
1 parent 9dad3425ce
commit d48f28c9f6
6 files changed
+365 -24

No files matched your search

@@ -52,6 +52,38 @@ test.describe("platform workflows at supported widths", () => {
expect((await new AxeBuilder({ page }).analyze()).violations).toEqual([]);
});
test("skip-link focus survives delayed session and lazy-route main replacements", async ({ page }) => {
let releaseSession!: () => void;
const sessionGate = new Promise<void>((resolve) => {
releaseSession = resolve;
});
await page.route("**/api/v1/auth/session", async (route) => {
await sessionGate;
await route.continue();
});
try {
await page.goto("/infrastructure");
const loadingMain = page.locator("#main-content");
await expect(loadingMain).toContainText("Sessiestatus wordt gecontroleerd…");
const initialLoadingMain = await loadingMain.elementHandle();
if (!initialLoadingMain) throw new Error("The session-loading main was not rendered.");
await page.keyboard.press("Tab");
await expect(page.getByRole("link", { name: "Ga naar de inhoud" })).toBeFocused();
await page.keyboard.press("Enter");
await expect(loadingMain).toBeFocused();
// The held session response lets keyboard activation focus the loading main
// first. Resolving it then replaces that main through lazy-route rendering.
releaseSession();
await expect.poll(() => initialLoadingMain.evaluate((element) => element.isConnected)).toBe(false);
await expect(page.locator("#main-content")).toContainText("Domeinen");
await expect(page.locator("#main-content")).toBeFocused();
} finally {
releaseSession();
}
});
test("narrow mobile controls stay touchable with a short virtual-keyboard viewport", async ({ page }) => {
await page.setViewportSize({ width: 320, height: 430 });
await page.goto("/admin/jobs");