Uh oh!
There was an error while loading. Please reload this page.
feat(reporter): introduce TestStep.subtitle, unify step formatting - #42422
Conversation
7fec640 to
594bba8Compare
This comment has been minimized.
This comment has been minimized.
Hi, I'm the Playwright bot and I took a first look at the CI failures here. 🟢 The one failure is a pre-existing flake — this PR looks clear
DetailsOverall: 1 failure, 5 flaky. The single failure is a known flake unrelated to the reporter/subtitle change; the flakies passed on retry. Nothing here points at this PR. Pre-existing flake / infra
Flaky (retry-passed in this run)
Take this as a first pass rather than the final word. Triaged by the Playwright bot - agent run |
This comment has been minimized.
This comment has been minimized.
594bba8 to
d891cb8Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Dmitry Gozman (dgozman)
left a comment
There was a problem hiding this comment.
What a beauty!
| {statusIcon(step.error || step.duration === -1 ? 'failed' : (step.skipped ? 'skipped' : 'passed'))} | ||
| <span className='step-title-text'> | ||
| {title} | ||
| {step.subtitle && <span className='step-subtitle'> {step.subtitle}</span>} |
There was a problem hiding this comment.
Since we are searching in the subtitle as well (see stepMatchesFilter), perhaps we should apply similar highlighting (block on the line 263 new code) to the subtitle?
There was a problem hiding this comment.
Good catch, done - extracted the highlight loop into highlightFilterText() and applied it to the subtitle as well. It also fixes a bug there: the non-matching chunks were taken from the lowercased string, so Click rendered as click while the filter was active.
Uh oh!
There was an error while loading. Please reload this page.
| await page.getByText('GET "/empty.html"').nth(2).click(); | ||
| await page.getByText('GET "/empty.html"').nth(1).click(); | ||
| await page.getByText('GET "/empty.html"').nth(0).click(); | ||
| await page.getByTestId('actions-tree').getByText('GET', { exact: true }).nth(2).click(); |
There was a problem hiding this comment.
Does this mean we are not showing the fetch url anymore?
There was a problem hiding this comment.
We do show it, it just moved from the quoted title into the subtitle line: the step now records title: "GET", subtitle: "/empty.html". The /empty.html rendering is the pre-existing url special case in formatProtocolParam (pathname + search), so it reads GET / /empty.html where it used to read GET "/empty.html".
The test only had to change because title and subtitle are separate nodes now - updated it to assert that explicitly instead of hiding it.
…rmatting
Step and action titles are now rendered uniformly from the protocol
metadata: `title` and `subtitle` templates live in protocol.yml, with
explicit `subtitle: '{selector}'` for selector-based actions and
`subtitle: '{url}'` for navigation/fetch. The `{selector}` placeholder
is rendered through asLocator. TestStep now carries `title`, `subtitle`
and `params`; the implicit selector-appending hacks in the test runner,
expect matchers, trace viewer, recorder call log and CLI trace tools
are removed in favor of the shared protocolFormatter helpers.d891cb8 to
55d024eCompareTest results for "tests 1"6 flaky51290 passed, 1237 skipped Merge workflow run. |
Test results for "MCP"3 failed 8256 passed, 1361 skipped Merge workflow run. |
🟡 Two confirmed flakes, one I can't fully clearHi, I'm the Playwright bot and I took a look at the CI failures here. The latest run's failures are all DetailsOverall: 3 failures in the latest MCP report, all Firefox on Windows; "tests 1" was all-flaky with no failures. This PR reworks step Pre-existing flake / infra
Uncertain
Take this as a first pass, not the final word. Triaged by the Playwright bot - agent run |
17454b0
into
microsoft:mainUh oh!
There was an error while loading. Please reload this page.
Summary
TestStepnow carriestitle,subtitleandparams;subtitleis exposed in the reporter API, JSON/blob reports, HTML report and traces.title/subtitletemplates are the source of truth in protocol.yml: selector actions declare explicitsubtitle: '{selector}'(enforced by generate_channels), navigation/fetch declaresubtitle: '{url}';{selector}renders through asLocator.