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

Fix duplicated test #2092

Merged
merged 1 commit into from
Feb 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/PuppeteerSharp.Tests/PageTests/PageEventsPopupTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ await Task.WhenAll(

[PuppeteerTest("page.spec.ts", "Page.Events.Popup", "should work with clicking target=_blank and with rel=opener")]
[SkipBrowserFact(skipFirefox: true)]
public async Task ShouldWorkWithFakeClickingTargetBlankAndReNoopener()
public async Task ShouldWorkWithFakeClickingTargetBlankAndRelOpener()
{
await Page.GoToAsync(TestConstants.EmptyPage);
await Page.SetContentAsync("<a target=_blank rel=noopener href='/one-style.html'>yo</a>");
await Page.SetContentAsync("<a target=_blank rel=opener href='/one-style.html'>yo</a>");

var popupTaskSource = new TaskCompletionSource<IPage>();
Page.Popup += (_, e) => popupTaskSource.TrySetResult(e.PopupPage);
Expand All @@ -76,7 +76,7 @@ await Task.WhenAll(
Page.QuerySelectorAsync("a").EvaluateFunctionAsync("a => a.click()"));

Assert.False(await Page.EvaluateExpressionAsync<bool>("!!window.opener"));
Assert.False(await popupTaskSource.Task.Result.EvaluateExpressionAsync<bool>("!!window.opener"));
Assert.True(await popupTaskSource.Task.Result.EvaluateExpressionAsync<bool>("!!window.opener"));
}

[PuppeteerTest("page.spec.ts", "Page.Events.Popup", "should work with fake-clicking target=_blank and rel=noopener")]
Expand Down