test(e2e): make the hover contrast assertion actually measure hover

The probes carry `transition-colors`, so reading the computed background right
after hover() sampled a colour still interpolating away from the rest state —
the half of the gate that exists to catch hover regressions could not catch one.
Disabling the transition on the probes fixes it: verified by giving one variant a
deliberately unreadable hover fill, which the assertion now reports as "badge
blue on hover" and previously let through.

Key the probe list off the variant union so a new badge variant fails to compile
until it is probed, rather than silently going unmeasured.

Also correct two route-manifest ownerships that misdirect diff-scoping: the flows
provider is mounted by the detail route as well as the list, and the provider
detail page was attributed to the list route that never renders it.

Doc fixes: the route sweep is tagged @cross, not @coverage; the licenses link in
CONTRIBUTING resolved outside the repository; and the frontend prettierignore
duplicated entries prettier already reads from gitignore.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Sergey Kozyrenko
2026-07-21 22:18:37 +07:00
co-authored by Claude Opus 4.8
parent 291a0af0dc
commit c479aec390
6 changed files with 22 additions and 19 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ When adding new dependencies, ensure they use compatible licenses:
./scripts/generate-licenses.sh
```
This script automatically collects license information from all dependencies and saves them to the `licenses/` directory. See [licenses/README.md](../licenses/README.md) for details.
This script automatically collects license information from all dependencies and saves them to the `licenses/` directory. See [licenses/README.md](licenses/README.md) for details.
3. Scan for issues:
```bash
-2
View File
@@ -1,2 +0,0 @@
e2e/test-results/
e2e/playwright-report/
+2 -2
View File
@@ -116,8 +116,8 @@ with `--grep` / `--grep-invert` (e.g. `pnpm e2e --grep @smoke`):
| `@smoke` | Sanity subset — auth, nav, the load-bearing happy paths |
| `@flows` | Flow list / detail / subscription / terminal specs |
| `@crud` | Create-read-update-delete journeys (knowledge, api tokens, templates) |
| `@coverage` | Surface coverage (dashboard, settings, resources, nav sweep) |
| `@cross` | Cross-cutting: themes, responsive, a11y |
| `@coverage` | Surface coverage (dashboard, settings, resources) |
| `@cross` | Cross-cutting: themes, responsive, a11y, contrast, route sweep |
| `@visual` | Screenshot baselines — runs only in the visual project |
| `@real` | Tier 2 — real backend + mock LLM (`specs/real/**`) |
| `@stand` | Tier 3 — LLM-independent smoke against a live stand |
+3
View File
@@ -19,6 +19,9 @@ export const mountContrastProbes = async (page: Page, probes: Record<string, str
probe.className = className;
probe.dataset.contrast = name;
// The variants carry `transition-colors`, so a measurement taken right after
// hover() would sample a colour mid-interpolation, near the rest state.
probe.style.transition = 'none';
probe.textContent = 'Sample';
host.append(probe);
}
+2 -1
View File
@@ -51,6 +51,7 @@ export const ROUTE_MANIFEST: RouteManifestEntry[] = [
'src/pages/flows',
'src/features/flows',
'src/providers/flow-provider.tsx',
'src/providers/flows-provider.tsx',
// Rendered inside the detail page's tabs alongside their owning routes.
'src/components/shared/file-manager',
'src/components/dashboard',
@@ -91,7 +92,7 @@ export const ROUTE_MANIFEST: RouteManifestEntry[] = [
cassette: settingsProvidersCassette,
path: routes.settings.providers,
ready: (page) => page.getByText('No providers configured'),
sources: ['src/pages/settings/settings-providers.tsx', 'src/pages/settings/settings-provider.tsx'],
sources: ['src/pages/settings/settings-providers.tsx'],
},
{
cassette: resourcesCassette,
+14 -13
View File
@@ -12,19 +12,20 @@ const EDITOR_TOKENS = {
'editor-variable': 'template-variable',
} as const;
const BADGE_VARIANTS = [
'blue',
'default',
'destructive',
'green',
'orange',
'outline',
'pink',
'purple',
'red',
'secondary',
'yellow',
] as const satisfies readonly BadgeVariant[];
// Keyed off the union so a newly added variant fails to compile until it is probed.
const BADGE_VARIANTS = Object.keys({
blue: true,
default: true,
destructive: true,
green: true,
orange: true,
outline: true,
pink: true,
purple: true,
red: true,
secondary: true,
yellow: true,
} satisfies Record<BadgeVariant, true>) as BadgeVariant[];
const THEMES = ['light', 'dark'] as const;