diff --git a/packages/playwright-core/src/web/htmlReport/chip.tsx b/packages/playwright-core/src/web/htmlReport/chip.tsx
index 2ca3811764..e05a96dd10 100644
--- a/packages/playwright-core/src/web/htmlReport/chip.tsx
+++ b/packages/playwright-core/src/web/htmlReport/chip.tsx
@@ -16,6 +16,7 @@
import * as React from 'react';
import './chip.css';
+import * as icons from './icons';
export const Chip: React.FunctionComponent<{
header: JSX.Element | string,
@@ -26,22 +27,10 @@ export const Chip: React.FunctionComponent<{
}> = ({ header, expanded, setExpanded, children, noInsets }) => {
return
setExpanded?.(!expanded)}>
- {setExpanded && !!expanded && downArrow()}
- {setExpanded && !expanded && rightArrow()}
+ {setExpanded && !!expanded && icons.downArrow()}
+ {setExpanded && !expanded && icons.rightArrow()}
{header}
{(!setExpanded || expanded) &&
{children}
}
;
};
-
-function downArrow() {
- return ;
-}
-
-function rightArrow() {
- return ;
-}
diff --git a/packages/playwright-core/src/web/htmlReport/filter.ts b/packages/playwright-core/src/web/htmlReport/filter.ts
index ed0ff9ee95..66467eb2f8 100644
--- a/packages/playwright-core/src/web/htmlReport/filter.ts
+++ b/packages/playwright-core/src/web/htmlReport/filter.ts
@@ -15,7 +15,6 @@
*/
import type { TestCaseSummary } from '@playwright/test/src/reporters/html';
-import './htmlReport.css';
export class Filter {
project: string[] = [];
diff --git a/packages/playwright-core/src/web/htmlReport/statsNavView.tsx b/packages/playwright-core/src/web/htmlReport/headerView.tsx
similarity index 57%
rename from packages/playwright-core/src/web/htmlReport/statsNavView.tsx
rename to packages/playwright-core/src/web/htmlReport/headerView.tsx
index d84381bb97..5e90e9a2f1 100644
--- a/packages/playwright-core/src/web/htmlReport/statsNavView.tsx
+++ b/packages/playwright-core/src/web/htmlReport/headerView.tsx
@@ -16,11 +16,45 @@
import type { Stats } from '@playwright/test/src/reporters/html';
import * as React from 'react';
-import './htmlReport.css';
-import { Link } from './links';
+import './common.css';
+import * as icons from './icons';
+import { Link, navigate } from './links';
import { statusIcon } from './statusIcon';
-export const StatsNavView: React.FC<{
+export const HeaderView: React.FC<{
+ stats: Stats,
+ filterText: string,
+ setFilterText: (filterText: string) => void,
+}> = ({ stats, filterText, setFilterText }) => {
+ React.useEffect(() => {
+ (async () => {
+ window.addEventListener('popstate', () => {
+ const params = new URLSearchParams(window.location.hash.slice(1));
+ setFilterText(params.get('q') || '');
+ });
+ })();
+ });
+
+ return ;
+};
+
+const StatsNavView: React.FC<{
stats: Stats
}> = ({ stats }) => {
return