diff --git a/packages/html-reporter/src/links.tsx b/packages/html-reporter/src/links.tsx index 4ef431b840c37..d2d0a905ff7ca 100644 --- a/packages/html-reporter/src/links.tsx +++ b/packages/html-reporter/src/links.tsx @@ -132,8 +132,9 @@ export const AttachmentLink: React.FunctionComponent<{ ); }; -export const TraceLink: React.FC<{ test: TestCaseSummary, trailingSeparator?: boolean, dim?: boolean }> = ({ test, trailingSeparator, dim }) => { - const firstTraces = test.results.map(result => result.attachments.filter(attachment => attachment.name === 'trace')).filter(traces => traces.length > 0)[0]; +export const TraceLink: React.FC<{ test: TestCaseSummary, run?: number, trailingSeparator?: boolean, dim?: boolean }> = ({ test, run, trailingSeparator, dim }) => { + const resultsToCheck = run !== undefined && test.results[run] ? [test.results[run]] : test.results; + const firstTraces = resultsToCheck.map(result => result.attachments.filter(attachment => attachment.name === 'trace')).filter(traces => traces.length > 0)[0]; if (!firstTraces) return undefined; diff --git a/packages/html-reporter/src/testCaseView.tsx b/packages/html-reporter/src/testCaseView.tsx index 11a031fb365f8..4e03ea2534b43 100644 --- a/packages/html-reporter/src/testCaseView.tsx +++ b/packages/html-reporter/src/testCaseView.tsx @@ -62,7 +62,7 @@ export const TestCaseView: React.FC<{
-