-
{treeItem.title}
+
+ {treeItem.title}
+ {treeItem.kind === 'case' ? treeItem.tags.map(tag => handleTagClick(e, tag)} />) : null}
+
{!!treeItem.duration && treeItem.status !== 'skipped' &&
{msToString(treeItem.duration)}
}
runTreeItem(treeItem)} disabled={!!runningState}>
diff --git a/packages/trace-viewer/src/ui/uiModeView.tsx b/packages/trace-viewer/src/ui/uiModeView.tsx
index a294e9b32b..a4d53f11b0 100644
--- a/packages/trace-viewer/src/ui/uiModeView.tsx
+++ b/packages/trace-viewer/src/ui/uiModeView.tsx
@@ -440,7 +440,9 @@ export const UIModeView: React.FC<{}> = ({
watchedTreeIds={watchedTreeIds}
setWatchedTreeIds={setWatchedTreeIds}
isLoading={isLoading}
- requestedCollapseAllCount={collapseAllCount} />
+ requestedCollapseAllCount={collapseAllCount}
+ setFilterText={setFilterText}
+ />
;
diff --git a/tests/playwright-test/ui-mode-fixtures.ts b/tests/playwright-test/ui-mode-fixtures.ts
index a8c2ede79b..fa1ee5c023 100644
--- a/tests/playwright-test/ui-mode-fixtures.ts
+++ b/tests/playwright-test/ui-mode-fixtures.ts
@@ -75,7 +75,7 @@ export function dumpTestTree(page: Page, options: { time?: boolean } = {}): () =
const indent = listItem.querySelectorAll('.list-view-indent').length;
const watch = listItem.querySelector('.toolbar-button.eye.toggled') ? ' 👁' : '';
const selected = listItem.classList.contains('selected') ? ' <=' : '';
- const title = listItem.querySelector('.ui-mode-list-item-title').textContent;
+ const title = listItem.querySelector('.ui-mode-list-item-title').childNodes[0].textContent;
const timeElement = options.time ? listItem.querySelector('.ui-mode-list-item-time') : undefined;
const time = timeElement ? ' ' + timeElement.textContent.replace(/[.\d]+m?s/, 'XXms') : '';
result.push(' ' + ' '.repeat(indent) + treeIcon + ' ' + statusIcon + ' ' + title + time + watch + selected);
diff --git a/tests/playwright-test/ui-mode-test-filters.spec.ts b/tests/playwright-test/ui-mode-test-filters.spec.ts
index f35d4dec4a..776e74f31e 100644
--- a/tests/playwright-test/ui-mode-test-filters.spec.ts
+++ b/tests/playwright-test/ui-mode-test-filters.spec.ts
@@ -56,6 +56,22 @@ test('should filter by explicit tags', async ({ runUITest }) => {
`);
});
+test('should display native tags and filter by them on click', async ({ runUITest }) => {
+ const { page } = await runUITest({
+ 'a.test.ts': `
+ import { test, expect } from '@playwright/test';
+ test('p', () => {});
+ test('pwt', { tag: '@smoke' }, () => {});
+ `,
+ });
+ await page.locator('.ui-mode-list-item-title').getByText('smoke').click();
+ await expect(page.getByPlaceholder('Filter')).toHaveValue('@smoke');
+ await expect.poll(dumpTestTree(page)).toBe(`
+ ▼ ◯ a.test.ts
+ ◯ pwt
+ `);
+});
+
test('should filter by status', async ({ runUITest }) => {
const { page } = await runUITest(basicTestTree);