Skip to content

chore: hide locator(':root') in Steps for toHaveTitle/URL - #36213

Merged
Max Schmitt (mxschmitt) merged 2 commits into
microsoft:mainfrom
mxschmitt:steps-page-assertions
Jun 16, 2025
Merged

chore: hide locator(':root') in Steps for toHaveTitle/URL#36213
Max Schmitt (mxschmitt) merged 2 commits into
microsoft:mainfrom
mxschmitt:steps-page-assertions

Conversation

@mxschmitt

@mxschmitt Max Schmitt (mxschmitt) commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

Before it looked like:

Screenshot 2025-06-05 at 14 41 27

Now it looks like:

Screenshot 2025-06-05 at 14 41 13

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@mxschmitt
Max Schmitt (mxschmitt) force-pushed the steps-page-assertions branch 2 times, most recently from c291c5b to 5481c54 Compare June 9, 2025 17:59
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread packages/playwright-core/src/client/page.ts Outdated
header = colors.red(`Timed out ${timeout}ms waiting for `) + header;
if (locator)
header += `Locator: ${String(locator)}\n`;
if (locatorOrPage)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I can't see this new suffix in any tests, and so I think we don't need it :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We test it here:

Locator: locator('#node')

Comment thread tests/page/expect-misc.spec.ts Outdated
this: ExpectMatcherState,
matcherName: string,
receiver: Locator,
receiver: Locator | Page,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I guess we should pass receiverLabel: 'page' whenever we pass a page, or better yet auto-detect it here? Perhaps default to receiverType.toLowerCase()?

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

6 flaky ⚠️ [chromium-library] › library/popup.spec.ts:258:3 › should not throw when click closes popup @chromium-ubuntu-22.04-node18
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
⚠️ [webkit-library] › library/browsercontext-viewport-mobile.spec.ts:97:5 › mobile viewport › should fire orientationchange event @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › library/video.spec.ts:475:5 › screencast › should scale frames down to the requested size @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

39401 passed, 822 skipped
✔️✔️✔️

Merge workflow 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