Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test(html reporter): filtering by type works (#32931)
Simon Knott29ffcdfc4e62
diff --git a/tests/playwright-test/reporter-html.spec.ts b/tests/playwright-test/reporter-html.spec.tsindex 1f5da44a84..1c5b5bbee4 100644--- a/tests/playwright-test/reporter-html.spec.ts+++ b/tests/playwright-test/reporter-html.spec.ts@@ -2258,10 +2258,19 @@ for (const useIntermediateMergeReport of [false] as const) {const searchInput = page.locator('.subnav-search-input');- 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();+ await test.step('filter by type and value', async () => {+ 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();+ });++ await test.step('filter by type', async () => {+ await searchInput.fill('annot:key');+ 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();+ });});test('tests should filter by fileName:line/column', async ({ runInlineTest, showReport, page }) => {