Skip to content

Commit

Permalink
Merge branch 'valentin/unified-a11y-testing' into yann/add-a11y-addon…
Browse files Browse the repository at this point in the history
…-to-sandboxes
  • Loading branch information
kasperpeulen authored Dec 6, 2024
2 parents b86c24b + dd3f1df commit 1294596
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/addons/test/src/components/TestProviderRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ export const TestProviderRender: FC<
}

return state.details?.testResults?.flatMap((result) =>
result.results.map((r) => r.reports.find((report) => report.type))
result.results
.filter((it) => !entryId || it.storyId === entryId || it.storyId.startsWith(`${entryId}-`))
.map((r) => r.reports.find((report) => report.type === 'a11y'))
);
}, [isA11yAddon, state.details?.testResults]);
}, [isA11yAddon, state.details?.testResults, entryId]);

const a11yStatus = useMemo<'positive' | 'warning' | 'negative' | 'unknown'>(() => {
if (!isA11yAddon || config.a11y === false) {
Expand Down

0 comments on commit 1294596

Please sign in to comment.