Skip to content

Commit

Permalink
Fix new assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
kblok committed Jul 24, 2023
1 parent 5e14563 commit 6a43da1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/PuppeteerSharp.Tests/NavigationTests/FrameGoToTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ public async Task ShouldRejectWhenFrameDetaches()
await Page.QuerySelectorAsync("iframe").EvaluateFunctionAsync("frame => frame.remove()");
var exception = await Assert.ThrowsAsync<NavigationException>(async () => await navigationTask);
Assert.Contains(
"Navigating frame was detached",
new[]
{
exception.Message
},
message => new[]
{
"Navigating frame was detached",
"Error: NS_BINDING_ABORTED",
"net::ERR_ABORTED",
});
"net::ERR_ABORTED"
}.Any(error => message.Contains(error)));
}

[PuppeteerTest("navigation.spec.ts", "Frame.goto", "should return matching responses")]
Expand Down

0 comments on commit 6a43da1

Please sign in to comment.