fix: correct catalog error contrast and add catalog Storybook coverage
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-10 07:04:40 -04:00
parent c85693c919
commit 6b528350c0
6 changed files with 83 additions and 1 deletions
+39
View File
@@ -0,0 +1,39 @@
import { expect, userEvent, within } from '@storybook/test';
import CatalogPage from './CatalogPage.vue';
export default {
title: 'Pages/CatalogPage',
component: CatalogPage,
};
export const Overview = {};
export const MobileFilterDisclosure = {
parameters: {
docs: {
description: {
story:
'On narrow viewports, catalog filters collapse behind a keyboard-operable disclosure that hides filter controls from the accessibility tree until expanded.',
},
},
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const toggle = canvas.getByRole('button', { name: /Filters/ });
const setFilter = canvas.getByPlaceholderText('SV151');
await expect(toggle).toHaveAttribute('aria-expanded', 'false');
await expect(setFilter).not.toBeVisible();
await userEvent.click(toggle);
await expect(toggle).toHaveAttribute('aria-expanded', 'true');
await expect(setFilter).toBeVisible();
await userEvent.click(toggle);
await expect(toggle).toHaveAttribute('aria-expanded', 'false');
await expect(setFilter).not.toBeVisible();
},
};