test(redesign): accept Phase 4 foundations with migration gates
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user