diff --git a/packages/html-reporter/src/filter.ts b/packages/html-reporter/src/filter.ts
index 94455b9bc9..9ec4ea7e59 100644
--- a/packages/html-reporter/src/filter.ts
+++ b/packages/html-reporter/src/filter.ts
@@ -46,8 +46,8 @@ export class Filter {
labels.add(token);
continue;
}
- if (token.startsWith('a:')) {
- annotations.add(token.slice(2));
+ if (token.startsWith('annot:')) {
+ annotations.add(token.slice('annot:'.length));
continue;
}
text.push(token.toLowerCase());
@@ -135,7 +135,7 @@ export class Filter {
}
if (this.annotations.length) {
const matches = this.annotations.every(annotation =>
- searchValues.annotations.some(_annotation => _annotation.includes(annotation)));
+ searchValues.annotations.some(a => a.includes(annotation)));
if (!matches)
return false;
}
diff --git a/packages/html-reporter/src/headerView.spec.tsx b/packages/html-reporter/src/headerView.spec.tsx
index fc8da5dcac..3131ae645d 100644
--- a/packages/html-reporter/src/headerView.spec.tsx
+++ b/packages/html-reporter/src/headerView.spec.tsx
@@ -59,6 +59,6 @@ test('should toggle filters', async ({ page, mount }) => {
await expect(page).toHaveURL(/#\?q=s:flaky/);
await component.locator('a', { hasText: 'Skipped' }).click();
await expect(page).toHaveURL(/#\?q=s:skipped/);
- await component.getByRole('searchbox').fill('a:annotation type=annotation description');
- expect(filters).toEqual(['', 's:passed', 's:failed', 's:flaky', 's:skipped', 'a:annotation type=annotation description']);
+ await component.getByRole('searchbox').fill('annot:annotation type=annotation description');
+ expect(filters).toEqual(['', 's:passed', 's:failed', 's:flaky', 's:skipped', 'annot:annotation type=annotation description']);
});
diff --git a/tests/playwright-test/reporter-html.spec.ts b/tests/playwright-test/reporter-html.spec.ts
index a8d9d5b798..83992c0bad 100644
--- a/tests/playwright-test/reporter-html.spec.ts
+++ b/tests/playwright-test/reporter-html.spec.ts
@@ -1702,8 +1702,8 @@ for (const useIntermediateMergeReport of [false] as const) {
const passedNavMenu = page.locator('.subnav-item:has-text("Passed")');
const failedNavMenu = page.locator('.subnav-item:has-text("Failed")');
const allNavMenu = page.locator('.subnav-item:has-text("All")');
- const smokeLabelButton = page.locator('.test-file-test', { has: page.getByText('@smoke fails', { exact: true }) }).locator('.label', { hasText: 'smoke' });
- const regressionLabelButton = page.locator('.test-file-test', { has: page.getByText('@regression passes', { exact: true }) }).locator('.label', { hasText: 'regression' });
+ const smokeLabelButton = page.locator('.label', { hasText: 'smoke' }).first();
+ const regressionLabelButton = page.locator('.label', { hasText: 'regression' }).first();
await failedNavMenu.click();
await smokeLabelButton.click();
@@ -2231,7 +2231,7 @@ for (const useIntermediateMergeReport of [false] as const) {
const searchInput = page.locator('.subnav-search-input');
- await searchInput.fill('a:key=value');
+ await searchInput.fill('annot:key=value');
await expect(page.getByText('a.test.js', { exact: true })).toBeVisible();
await expect(page.getByText('non-annotated test')).not.toBeVisible();
await expect(page.getByText('annotated test')).toBeVisible();