Skip to content

Commit

Permalink
use mock ids for snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-heppner-ibigroup committed Apr 5, 2024
1 parent 90c80e6 commit c881a6e
Show file tree
Hide file tree
Showing 16 changed files with 760 additions and 300,875 deletions.
11 changes: 11 additions & 0 deletions .storybook/test-runner.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import type { TestRunnerConfig } from '@storybook/test-runner';
import { injectAxe, checkA11y } from 'axe-playwright';

const config: TestRunnerConfig = {
async preVisit(page) {
await injectAxe(page);
},
async postVisit(page, context) {
// the #storybook-root element wraps the story. In Storybook 6.x, the selector is #root
const elementHandler = await page.$('#storybook-root');
const innerHTML = await elementHandler?.innerHTML();
expect(innerHTML).toMatchSnapshot();

// await checkA11y(page, '#storybook-root', {
// detailedReport: true,
// detailedReportOptions: {
// html: true,
// },
// });
},
};

Expand Down
Loading

0 comments on commit c881a6e

Please sign in to comment.