Skip to content

Commit

Permalink
Merge pull request #39 from code0-tech/disable-a11y-on-snapshot-updates
Browse files Browse the repository at this point in the history
Disable a11y tests for snapshot update pipelines
  • Loading branch information
Taucher2003 authored Dec 28, 2023
2 parents 173f17b + 683c12c commit 85be985
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ storybook:build:
storybook:test:
extends:
- .storybook:test:base
variables:
C0_DISABLE_A11Y_TESTS: 'true'
script:
- npm run storybook:test:all -- --ci || exit_code=$?
- |
Expand Down
4 changes: 4 additions & 0 deletions .storybook/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ const customSnapshotsDir = `${process.cwd()}/__snapshots__`;
const prepareA11y = async (page) => await injectAxe(page);

const executeA11y = async (page, context) => {
if(process.env.C0_DISABLE_A11Y_TESTS) {
return;
}

// Get the entire context of a story, including parameters, args, argTypes, etc.
const storyContext = await getStoryContext(page, context);

Expand Down

0 comments on commit 85be985

Please sign in to comment.