Skip to content

Commit

Permalink
Merge pull request #310 from k35o/re
Browse files Browse the repository at this point in the history
調整
  • Loading branch information
k35o authored Oct 14, 2024
2 parents c523861 + 9b43532 commit 57b110f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .storybook/public/mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* - Please do NOT serve this file on production.
*/

const PACKAGE_VERSION = '2.4.9'
const PACKAGE_VERSION = '2.4.10'
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set()
Expand Down
15 changes: 12 additions & 3 deletions test-runner.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import type { TestRunnerConfig } from '@storybook/test-runner';
import { injectAxe, checkA11y } from 'axe-playwright';
import {
getStoryContext,
type TestRunnerConfig,
} from '@storybook/test-runner';
import { injectAxe, checkA11y, configureAxe } from 'axe-playwright';

const config: TestRunnerConfig = {
async preVisit(page) {
await injectAxe(page);
},
async postVisit(page) {
async postVisit(page, context) {
const storyContext = await getStoryContext(page, context);

await configureAxe(page, {
rules: storyContext.parameters?.a11y?.config?.rules,
});

await checkA11y(page, '#storybook-root', {
detailedReport: true,
detailedReportOptions: {
Expand Down

0 comments on commit 57b110f

Please sign in to comment.