test(redesign): accept Phase 4 foundations with migration gates

This commit is contained in:
cesnimda
2026-09-13 19:18:33 +02:00
parent c99f4fb7dd
commit 2a2f9e4805
42 changed files with 17820 additions and 4 deletions
+4 -2
View File
@@ -55,13 +55,15 @@ async function keyboardFocus(page: Page, target: Locator) {
await page.keyboard.press("Tab");
await page.keyboard.press("Shift+Tab");
await expect(target).toBeFocused();
const ring = await target.evaluate(node => {
// The native input can be focused before MUI commits the wrapper's
// Mui-focusVisible class. Require the same ring within the normal UI timeout.
const readRing = () => target.evaluate(node => {
const control = node.closest(".MuiInputBase-root, .MuiCheckbox-root") ?? node;
const notch = control.querySelector(".MuiOutlinedInput-notchedOutline");
const css = getComputedStyle(notch ?? control);
return { width: notch ? css.borderTopWidth : css.outlineWidth, style: notch ? css.borderTopStyle : css.outlineStyle };
});
expect(ring).toEqual({ width: "3px", style: "solid" });
await expect.poll(readRing).toEqual({ width: "3px", style: "solid" });
}
for (const mode of ["light", "dark"] as const) for (const language of ["en", "nb"] as const) {