Skip to content

chore: fix flaky codegen test by not recording x-pw- actions#39211

Merged
Skn0tt merged 2 commits intomicrosoft:mainfrom
Skn0tt:dont-record-test-actions
Feb 11, 2026
Merged

chore: fix flaky codegen test by not recording x-pw- actions#39211
Skn0tt merged 2 commits intomicrosoft:mainfrom
Skn0tt:dont-record-test-actions

Conversation

@Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Feb 10, 2026

In a flaky run of should update locator highlight, i saw this log:

387291.345 setHighlightedSelector getByRole('button', { name: 'Cancel' })
387302.543 onBeforeCall expect { selector: 'x-pw-highlight', ... }
387309.533 __pw_recorderState { ... actionSelector: 'x-pw-highlight' ... }

here's the green next run:

405409.758 setHighlightedSelector getByRole('button', { name: 'Cancel' })
405416.736 __pw_recorderState { ... actionSelector: 'internal:role=button[name="Cancel"i]' ... }
405422.924 onBeforeCall expect { selector: 'x-pw-highlight', ... }
405445.428 onAfterCall expect { ... }

expect reaches the recorder and sets actionSelector to x-pw-highlight, making x-pw-highlight close in the process. I'm fixing it by making the recorder ignore all actions.

await expect(recorder.page.locator('x-pw-highlight')).toBeVisible();

@Skn0tt Skn0tt changed the title chore: fix flaky codegen tests by not recording x-pw- actions chore: fix flaky codegen test by not recording x-pw- actions Feb 10, 2026
@github-actions

This comment has been minimized.

@Skn0tt Skn0tt marked this pull request as ready for review February 10, 2026 13:39
@Skn0tt Skn0tt requested a review from dgozman February 10, 2026 13:39
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

Test results for "tests 1"

4 failed
❌ [playwright-test] › to-have-screenshot.spec.ts:939 › should respect maxDiffPixels option @macos-latest-node20
❌ [playwright-test] › to-have-screenshot.spec.ts:1022 › should satisfy both maxDiffPixelRatio and maxDiffPixels @macos-latest-node20
❌ [playwright-test] › to-have-screenshot.spec.ts:1091 › should respect maxDiffPixelRatio option @macos-latest-node20
❌ [playwright-test] › update-aria-snapshot.spec.ts:669 › update-source-method › should overwrite source when specified in the config @macos-latest-node20

1 flaky ⚠️ [chromium-page] › page/page-request-continue.spec.ts:754 › propagate headers cross origin redirect after interception `@chromium-ubuntu-22.04-node22`

38554 passed, 843 skipped


Merge workflow run.

@github-actions
Copy link
Contributor

Test results for "MCP"

7 failed
❌ [chrome] › mcp/roots.spec.ts:47 › check that trace is saved in workspace @mcp-windows-latest
❌ [chrome] › mcp/tabs.spec.ts:79 › select tab @mcp-macos-15
❌ [chromium] › mcp/cli-core.spec.ts:37 › click button @mcp-macos-15
❌ [chromium] › mcp/http.spec.ts:263 › http transport shared context @mcp-macos-15
❌ [chromium] › mcp/launch.spec.ts:21 › test reopen browser @mcp-macos-15
❌ [chromium] › mcp/tabs.spec.ts:79 › select tab @mcp-macos-15
❌ [chromium] › mcp/video.spec.ts:43 › should work with { saveVideo } (isolated) @mcp-macos-15

4772 passed, 135 skipped


Merge workflow run.

@Skn0tt Skn0tt merged commit f60a378 into microsoft:main Feb 11, 2026
30 of 33 checks passed
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