diff --git a/.storybook/test-runner.ts b/.storybook/test-runner.ts index ab8071969a1c84fba008933d487331abe1a841d0..034fc4ec72bf50c4d85ef2cc8a19ed67deca04c7 100644 --- a/.storybook/test-runner.ts +++ b/.storybook/test-runner.ts @@ -129,6 +129,10 @@ const config: TestRunnerConfig = { } await appendFile(seenSnapshotsFile, relative(ROOT_DIR, targetFile) + '\n'); + // run accessibility tests + console.log(`running accessibility test for story:${context.name}`); + await runA11y(page, context); + expect(image).toMatchImageSnapshot({ // Custom names for screenshots customSnapshotsDir, @@ -139,9 +143,6 @@ const config: TestRunnerConfig = { storeReceivedOnFailure: true, ...getMatchOptions(context), }); - - // run accessibility tests - await runA11y(page, context); }, tags: { skip: ['skip-visual-test'],