import { afterEach, describe, it } from 'vitest' import { expect } from 'storybook/test' import { StyledButton } from 'src/components/inputs/button/StyledButton' import { StyledMenuItem } from 'src/components/navigation/menu/StyledMenuItem' import { StyledTab } from 'src/components/navigation/tabs/StyledTab' import { StyledTabs } from 'src/components/navigation/tabs/StyledTabs' import { cleanup, mount } from 'src/test-utils/renderInteraction' import { page } from 'src/test-utils/interaction-api' /** * ASMA-8210 (TB-02) — the touch-readiness primitives in `src/styles/index.css`. * * Real Chromium rather than the unit project, because every claim here is a computed-style or a * hit-testing question: `::after` geometry, `touch-action` and "is this point inside the target" * are exactly what a DOM emulator invents. The suite mounts components directly (no stories), so * it adds no VRT baseline — see `docs/a11y-keyboard-contract.md`. */ /** The `min-height` the mobile-gated `.asma-touch-target` rule declares, or null if it is missing. */ const touchTargetMinHeightUnderMobileMedia = (): string | null => { for (const sheet of Array.from(document.styleSheets)) { let rules: CSSRule[] try { rules = Array.from(sheet.cssRules) } catch { continue // cross-origin sheet; ours are inline