-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: toHaveURL predicate matcher #34413
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -1404,8 +1404,6 @@ export class InjectedScript { | |||
received = getAriaRole(element) || ''; | |||
} else if (expression === 'to.have.title') { | |||
received = this.document.title; | |||
} else if (expression === 'to.have.url') { | |||
received = this.document.location.href; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Side note, ports are now on their own with this)
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"2 failed 20 flaky37638 passed, 648 skipped Merge workflow run. |
Addresses the requested functionality of #32708 in a generic way, enabling the user to match on the native rich URL object. This enables patterns for checking for search params, hostnames, and other specific fields of the entire URL.
Care was taken to ensure rich error messages are provided. Examples:
String match failure
Predicate failure
Predicate
.not
failureInvalid argument failure