diff --git a/packages/html-reporter/src/testCaseView.tsx b/packages/html-reporter/src/testCaseView.tsx index eecbdac9f5..a038f44785 100644 --- a/packages/html-reporter/src/testCaseView.tsx +++ b/packages/html-reporter/src/testCaseView.tsx @@ -72,11 +72,21 @@ function renderAnnotationDescription(description: string) { return description; } -function TestCaseAnnotationView({ annotation: { type, description } }: { annotation: TestCaseAnnotation }) { +function renderAnnotationLink(url: string) { + try { + if (['http:', 'https:'].includes(new URL(url).protocol)) { + return {url}; + } + } catch {} + return url; +} + +function TestCaseAnnotationView({ annotation: { type, description, url } }: { annotation: TestCaseAnnotation }) { return (