Skip to content

Commit

Permalink
Add conditional rendering for a11yNotPassedAmount based on story entry
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Dec 16, 2024
1 parent 302c65c commit 7e2821f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/addons/test/src/components/TestProviderRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export const TestProviderRender: FC<
state.config || { a11y: false, coverage: false }
);

const isStoryEntry = entryId?.includes('--') ?? false;

const a11yResults = useMemo(() => {
if (!isA11yAddon) {
return [];
Expand Down Expand Up @@ -340,7 +342,7 @@ export const TestProviderRender: FC<
: null
}
icon={<TestStatusIcon status={a11yStatus} aria-label={`status: ${a11yStatus}`} />}
right={a11yNotPassedAmount || null}
right={isStoryEntry ? null : a11yNotPassedAmount || null}
/>
)}
</Extras>
Expand Down

0 comments on commit 7e2821f

Please sign in to comment.