Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(trace): highlight strict mode violation elements in the snapshot #32893

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Oct 1, 2024

This is fixing a case where the test failed with strict mode violation, but all the matched elements are not highlighted in the trace.

For example, all the buttons will be highlighted when the following line fails due to strict mode violation:

await page.locator('button').click();

To achieve this, we mark elements during querySelector phase instead of inside onBeforeInputAction. This allows us to only mark from inside the InjectedScript and remove the other way of marking from inside the Snapshotter.

Copy link
Contributor

github-actions bot commented Oct 1, 2024

Test results for "tests 1"

1 flaky ⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all

36408 passed, 758 skipped
✔️✔️✔️

Merge workflow run.

@dgozman dgozman merged commit 7732028 into microsoft:main Oct 2, 2024
30 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