forked from hardkoded/puppeteer-sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement AppMode tests (hardkoded#340)
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace PuppeteerSharp.Tests.PuppeteerTests | ||
{ | ||
[Collection("PuppeteerLoaderFixture collection")] | ||
public class AppModeTests : PuppeteerBaseTest | ||
{ | ||
public AppModeTests(ITestOutputHelper output) : base(output) { } | ||
|
||
[Fact] | ||
public async Task ShouldWork() | ||
{ | ||
var options = TestConstants.DefaultBrowserOptions(); | ||
options.AppMode = true; | ||
|
||
using (var browser = await Puppeteer.LaunchAsync(options, TestConstants.ChromiumRevision, TestConstants.LoggerFactory)) | ||
using (var page = await browser.NewPageAsync()) | ||
{ | ||
Assert.Equal(121, await page.EvaluateExpressionAsync<int>("11 * 11")); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters