Skip to content

fix(html reporter): print show-report path relative to npm invocation dir - #42897

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:html-report-init-cwd
Sep 24, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:html-report-init-cwd

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

Summary

  • When npm run scripts cd before running tests, the suggested show-report command now uses a path relative to INIT_CWD, so it works when pasted from where the user invoked npm.

} else if (this._options._mode === 'test' && !!process.stdin.isTTY) {
const packageManagerCommand = getPackageManagerExecCommand();
const relativeReportPath = this._outputFolder === standaloneDefaultFolder() ? '' : ' ' + path.relative(process.cwd(), this._outputFolder);
const invocationDir = process.env.INIT_CWD || process.cwd();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a comment where INIT_CWD can come from

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/sse.spec.ts:196 › sse transport browser lifecycle (persistent) @mcp-ubuntu-latest-firefox

8704 passed, 1474 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

6 flaky ⚠️ [chromium-library] › library/chromium/chromium.spec.ts:373 › should produce network events, routing, and annotations for Service Worker `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/trace-viewer.spec.ts:2540 › should handle failed snapshots due to dialog `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:827 › should update state on subsequent run `@windows-latest-node22`

52154 passed, 1241 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 The one failure is a pre-existing flake — this PR is clear

Hi, I'm the Playwright bot and I triaged the failing CI run here.

[firefox] › mcp/sse.spec.ts:196 › sse transport browser lifecycle (persistent) is the only failure, and the identical failure shows up on plain main with no PR attached.

Details

This PR touches packages/playwright/src/reporters/html.ts (the show-report hint path) and tests/playwright-test/reporter-html.spec.ts. Nothing in that diff is reachable from the MCP SSE transport, so there's no path from the change to this failure.

Pre-existing flake / infra

  • [firefox] › mcp/sse.spec.ts:196 › sse transport browser lifecycle (persistent) — the same test fails with the same assertion ("result": "undefined" instead of "\"42\"") on SHAs this PR can't be responsible for:

    It also flips verdict within this PR's own history — on sha 3597ea1b (run 35938925547) it failed on the first attempt and a retry rescued it. Across the results DB it passes in roughly 3660 of 3662 recent run/browser combinations, so it's bimodal rather than broken: the SSE session occasionally comes back before the tool result is available.

One caveat on the rest of the report: the "tests 1" workflow run was cancelled, so its blob reports are incomplete and only 104 tests are accounted for there. That's missing coverage, not a failure, but a clean rerun would make the green more meaningful.

Triaged by the Playwright bot - agent run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants