diff --git a/packages/trace-viewer/src/ui/networkTab.tsx b/packages/trace-viewer/src/ui/networkTab.tsx index b86da754a3..2448c3c0bc 100644 --- a/packages/trace-viewer/src/ui/networkTab.tsx +++ b/packages/trace-viewer/src/ui/networkTab.tsx @@ -133,6 +133,8 @@ const columnWidth = (column: ColumnName) => { return 60; if (column === 'contentType') return 200; + if (column === 'contextId') + return 60; return 100; }; @@ -210,7 +212,7 @@ class ContextIdGenerator { let shortId = this._pagerefToShortId.get(pageref); if (!shortId) { ++this._lastPageId; - shortId = 'page@' + this._lastPageId; + shortId = 'page#' + this._lastPageId; this._pagerefToShortId.set(pageref, shortId); } return shortId; @@ -223,7 +225,7 @@ class ContextIdGenerator { let contextId = (contextEntry as any)[ContextIdGenerator._apiRequestContextIdSymbol]; if (!contextId) { ++this._lastApiRequestContextId; - contextId = 'api@' + this._lastApiRequestContextId; + contextId = 'api#' + this._lastApiRequestContextId; (contextEntry as any)[ContextIdGenerator._apiRequestContextIdSymbol] = contextId; } return contextId; diff --git a/tests/playwright-test/ui-mode-trace.spec.ts b/tests/playwright-test/ui-mode-trace.spec.ts index c9afe336e6..0f6194b25f 100644 --- a/tests/playwright-test/ui-mode-trace.spec.ts +++ b/tests/playwright-test/ui-mode-trace.spec.ts @@ -302,7 +302,7 @@ test('should show request source context id', async ({ runUITest, server }) => { await page.getByText('pass').dblclick(); await page.getByText('Network', { exact: true }).click(); await expect(page.locator('span').filter({ hasText: 'Source' })).toBeVisible(); - await expect(page.getByText('page@1')).toBeVisible(); - await expect(page.getByText('page@2')).toBeVisible(); - await expect(page.getByText('api@1')).toBeVisible(); + await expect(page.getByText('page#1')).toBeVisible(); + await expect(page.getByText('page#2')).toBeVisible(); + await expect(page.getByText('api#1')).toBeVisible(); });