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