-
-
Notifications
You must be signed in to change notification settings - Fork 443
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
Upgrade chrome to 1108766 #2259
Conversation
Assert.Contains( | ||
"Navigating frame was detached", | ||
new[] | ||
{ | ||
"Navigating frame was detached", | ||
"Error: NS_BINDING_ABORTED", | ||
"net::ERR_ABORTED", | ||
}); |
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.
Is this change intentional? The assertion is now always true as both subject and expectation are fixed values.
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.
This matches the change upstream 🤷
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.
No :)
The upstream asserts that error.message
contains at least one of the three elements.
This change asserts that either of the three elements is "Navigating frame was detached"
.
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.
This is the best I can come up with xUnit
Assert.Contains(new[] { exception.Message }, message => new[]
{
"Navigating frame was detached",
"Error: NS_BINDING_ABORTED",
"net::ERR_ABORTED"
}.Any(error => message.Contains(error)));
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.
With FluentAssertions it can be written as
exception.Message.Should().ContainAny(
"Navigating frame was detached",
"Error: NS_BINDING_ABORTED",
"net::ERR_ABORTED"
);
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.
Oops you're so right 😅
The test passes right? 😅
closes #2258