From 8033d7bcaeab84760a437aa813b254c5155205d9 Mon Sep 17 00:00:00 2001 From: GingerHeadSam <50044700+GingerHeadSam@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:03:06 +0000 Subject: [PATCH] Resolved HTML Report Bug Resolves #34085 Resolves console errors and reports are visible again. --- packages/html-reporter/src/filter.ts | 2 +- packages/html-reporter/src/testCaseView.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/html-reporter/src/filter.ts b/packages/html-reporter/src/filter.ts index 280c9a566b..cb9c82ff32 100644 --- a/packages/html-reporter/src/filter.ts +++ b/packages/html-reporter/src/filter.ts @@ -176,7 +176,7 @@ function cacheSearchValues(test: TestCaseSummary & { [searchValuesSymbol]?: Sear line: String(test.location.line), column: String(test.location.column), labels: test.tags.map(tag => tag.toLowerCase()), - annotations: test.annotations.map(a => a.type.toLowerCase() + '=' + a.description?.toLocaleLowerCase()) + annotations: test.annotations.map(a => a?.type?.toLowerCase() + '=' + a.description?.toLocaleLowerCase()) }; test[searchValuesSymbol] = searchValues; return searchValues; diff --git a/packages/html-reporter/src/testCaseView.tsx b/packages/html-reporter/src/testCaseView.tsx index e4ffa9c15b..77ba5fef32 100644 --- a/packages/html-reporter/src/testCaseView.tsx +++ b/packages/html-reporter/src/testCaseView.tsx @@ -46,7 +46,7 @@ export const TestCaseView: React.FC<{ }, [test]); const visibleAnnotations = React.useMemo(() => { - return test?.annotations?.filter(annotation => !annotation.type.startsWith('_')) || []; + return test?.annotations?.filter(annotation => !annotation?.type?.startsWith('_')) || []; }, [test?.annotations]); return