From 7e2821f1f7b8751dfe0e53290b3abad487e4211f Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 16 Dec 2024 12:52:32 +0100 Subject: [PATCH] Add conditional rendering for a11yNotPassedAmount based on story entry --- code/addons/test/src/components/TestProviderRender.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/addons/test/src/components/TestProviderRender.tsx b/code/addons/test/src/components/TestProviderRender.tsx index 0c1185ab6f2a..71810c6e1071 100644 --- a/code/addons/test/src/components/TestProviderRender.tsx +++ b/code/addons/test/src/components/TestProviderRender.tsx @@ -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 []; @@ -340,7 +342,7 @@ export const TestProviderRender: FC< : null } icon={} - right={a11yNotPassedAmount || null} + right={isStoryEntry ? null : a11yNotPassedAmount || null} /> )}