Skip to content

feat(test-runner): support locks in test.describe.configure - #42792

Open
Devin Rousso (dcrousso) wants to merge 1 commit into
microsoft:mainfrom
dcrousso:fix-42782
Open

Devin Rousso (dcrousso) wants to merge 1 commit into
microsoft:mainfrom
dcrousso:fix-42782

Conversation

@dcrousso

Copy link
Copy Markdown
Contributor

locks cannot be declared imperatively for the enclosing suite

add a lock option to test.describe.configure that accumulates suite locks

fixes #42782

locks cannot be declared imperatively for the enclosing suite

add a `lock` option to `test.describe.configure` that accumulates suite locks
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

8 flaky ⚠️ [chromium-library] › library/tracing.spec.ts:533 › should produce screencast frames fit `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:521 › screencast › should capture static page in persistent context Radoslav Kirilov (@smoke) `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:356 › screencast › should work for popups `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:373 › should produce network events, routing, and annotations for Service Worker `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:725 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node22`
⚠️ [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`

52059 passed, 1250 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

2 failed
❌ [chrome] › mcp/cli-webmcp.spec.ts:188 › webmcp-call disambiguates same-name tools in identical same-origin frames @mcp-macos-latest-chrome
❌ [chromium] › mcp/cli-webmcp.spec.ts:135 › webmcp-list stitches tools across frames @mcp-macos-latest-chromium

8690 passed, 1474 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 Both failures are pre-existing WebMCP flakes — the PR is clear

Hi, I'm the Playwright bot and I took a look at the red CI here.

The two failing MCP tests both fail on unrelated PRs and on main with byte-identical errors, including on 07f1a615 — this PR's own base commit. This PR only touches test.describe.configure locks in the test runner, which cli-webmcp.spec.ts doesn't exercise.

Details

The "tests 1" report has no failures (8 flaky, all screencast/video/cookie regulars), so there's nothing to triage there. Only the "MCP" report is red, with two failures — both in mcp/cli-webmcp.spec.ts on the macOS bots.

Pre-existing flake / infra

Both signatures are the same underlying race: the second frame's tool registration hasn't landed by the time webmcp-list/webmcp-call reads it, so only one tool is seen. Neither failed on retry-zero only by chance — the whole cli-webmcp.spec.ts file has been flipping verdict across unrelated SHAs for the past day.

Caused by this PR

Nothing. The diff is packages/playwright/src/common/testType.ts (the lock option on test.describe.configure), its types/docs, and tests/playwright-test/test-locks.spec.ts. The playwright-test project is green, and the MCP suite doesn't go near suite-level locks.

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.

[Feature]: Declare a lock for the enclosing suite with test.describe.configure({ lock })

1 participant