Skip to content

Commit

Permalink
Microsoft Edge Friendly tests (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
kblok authored Apr 22, 2019
1 parent e128433 commit fbdabce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async Task ShouldWorkWithInterventionHeaders()

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

Assert.Contains("www.chromestatus.com", interventionHeader);
Assert.Contains("feature/5718547946799104", interventionHeader);
}
}
}
4 changes: 2 additions & 2 deletions lib/PuppeteerSharp.Tests/NetworkTests/ResponseTextTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ResponseTextTests(ITestOutputHelper output) : base(output)
public async Task ShouldWork()
{
var response = await Page.GoToAsync(TestConstants.ServerUrl + "/simple.json");
Assert.Equal("{\"foo\": \"bar\"}\n", await response.TextAsync());
Assert.Equal("{\"foo\": \"bar\"}", (await response.TextAsync()).Trim());
}

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

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,9 @@ public async Task ShouldWorkWithNoDefaultArguments()
var options = TestConstants.DefaultBrowserOptions();
options.IgnoreDefaultArgs = true;
using (var browser = await Puppeteer.LaunchAsync(options, TestConstants.LoggerFactory))
using (var page = await browser.NewPageAsync())
{
Assert.Single(await browser.PagesAsync());
using (var page = await browser.NewPageAsync())
{
Assert.Equal(121, await page.EvaluateExpressionAsync<int>("11 * 11"));
}
Assert.Equal(121, await page.EvaluateExpressionAsync<int>("11 * 11"));
}
}

Expand Down

0 comments on commit fbdabce

Please sign in to comment.