-
-
{test.location.file}:{test.location.line}
-
- {imageDiffBadge(test)}
- {videoBadge(test)}
-
+
+
+ {test.location.file}:{test.location.line}
+
+ {imageDiffBadge(test)}
+ {videoBadge(test)}
+
+
)}
diff --git a/packages/html-reporter/src/testFilesView.tsx b/packages/html-reporter/src/testFilesView.tsx
index 527deadadb965..efffa58a955f1 100644
--- a/packages/html-reporter/src/testFilesView.tsx
+++ b/packages/html-reporter/src/testFilesView.tsx
@@ -24,6 +24,7 @@ import { CodeSnippet } from './testErrorView';
import * as icons from './icons';
import { isMetadataEmpty, MetadataView } from './metadataView';
import { HeaderView } from './headerView';
+import { clsx } from '@web/uiUtils';
export const TestFilesView: React.FC<{
tests: TestFileSummary[],
@@ -71,9 +72,19 @@ export const TestFilesHeader: React.FC<{
if (!report)
return null;
+ const showProject = report.projectNames.length === 1 && !!report.projectNames[0];
+ const isMetadataInTopLine = !showProject && !filteredStats;
+
+ const metadataToggleButton = !isMetadataEmpty(report.metadata) && (
+
- {report.projectNames.length === 1 && !!report.projectNames[0] &&
Project: {report.projectNames[0]}
}
+ {showProject &&
Project: {report.projectNames[0]}
}
{filteredStats &&
Filtered: {filteredStats.total} {!!filteredStats.total && ('(' + msToString(filteredStats.duration) + ')')}
}
+ {isMetadataInTopLine && metadataToggleButton}
;
const rightSuperHeader = <>
@@ -83,9 +94,7 @@ export const TestFilesHeader: React.FC<{
return <>