Skip to content

Commit fbdabce

Browse files
authored
Microsoft Edge Friendly tests (#1074)
1 parent e128433 commit fbdabce

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

lib/PuppeteerSharp.Tests/ChromiumSpecificTests/PageTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public async Task ShouldWorkWithInterventionHeaders()
3434

3535
await Page.GoToAsync(TestConstants.ServerUrl + "/intervention");
3636

37-
Assert.Contains("www.chromestatus.com", interventionHeader);
37+
Assert.Contains("feature/5718547946799104", interventionHeader);
3838
}
3939
}
4040
}

lib/PuppeteerSharp.Tests/NetworkTests/ResponseTextTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public ResponseTextTests(ITestOutputHelper output) : base(output)
1919
public async Task ShouldWork()
2020
{
2121
var response = await Page.GoToAsync(TestConstants.ServerUrl + "/simple.json");
22-
Assert.Equal("{\"foo\": \"bar\"}\n", await response.TextAsync());
22+
Assert.Equal("{\"foo\": \"bar\"}", (await response.TextAsync()).Trim());
2323
}
2424

2525
[Fact]
@@ -28,7 +28,7 @@ public async Task ShouldReturnUncompressedText()
2828
Server.EnableGzip("/simple.json");
2929
var response = await Page.GoToAsync(TestConstants.ServerUrl + "/simple.json");
3030
Assert.Equal("gzip", response.Headers["Content-Encoding"]);
31-
Assert.Equal("{\"foo\": \"bar\"}\n", await response.TextAsync());
31+
Assert.Equal("{\"foo\": \"bar\"}", (await response.TextAsync()).Trim());
3232
}
3333

3434
[Fact]

lib/PuppeteerSharp.Tests/PuppeteerTests/PuppeteerLaunchTests.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,9 @@ public async Task ShouldWorkWithNoDefaultArguments()
240240
var options = TestConstants.DefaultBrowserOptions();
241241
options.IgnoreDefaultArgs = true;
242242
using (var browser = await Puppeteer.LaunchAsync(options, TestConstants.LoggerFactory))
243+
using (var page = await browser.NewPageAsync())
243244
{
244-
Assert.Single(await browser.PagesAsync());
245-
using (var page = await browser.NewPageAsync())
246-
{
247-
Assert.Equal(121, await page.EvaluateExpressionAsync<int>("11 * 11"));
248-
}
245+
Assert.Equal(121, await page.EvaluateExpressionAsync<int>("11 * 11"));
249246
}
250247
}
251248

0 commit comments

Comments
 (0)