diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41b9bcad..9d9fa4db 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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=$? - | diff --git a/.storybook/test-runner.ts b/.storybook/test-runner.ts index 52d50930..db0b25d5 100644 --- a/.storybook/test-runner.ts +++ b/.storybook/test-runner.ts @@ -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);