File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
lib/PuppeteerSharp.Tests/BrowserTests Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1+ using System . Threading . Tasks ;
2+ using PuppeteerSharp . Tests . Attributes ;
3+ using PuppeteerSharp . Xunit ;
4+ using Xunit ;
5+ using Xunit . Abstractions ;
6+
7+ namespace PuppeteerSharp . Tests . BrowserTests
8+ {
9+ [ Collection ( TestConstants . TestFixtureCollectionName ) ]
10+ public class BrowserVersionTests : PuppeteerBrowserBaseTest
11+ {
12+ public BrowserVersionTests ( ITestOutputHelper output ) : base ( output )
13+ {
14+ }
15+
16+ [ PuppeteerTest ( "browser.spec.ts" , "Browser.version" , "should return whether we are in headless" ) ]
17+ [ PuppeteerFact ]
18+ public async Task ShouldReturnWhetherWeAreInHeadless ( )
19+ {
20+ var version = await Browser . GetVersionAsync ( ) ;
21+ Assert . NotEmpty ( version ) ;
22+ }
23+ }
24+ }
Original file line number Diff line number Diff line change @@ -13,10 +13,16 @@ public ProcessTests(ITestOutputHelper output) : base(output) { }
1313
1414 [ PuppeteerTest ( "browser.spec.ts" , "Browser.process" , "should return child_process instance" ) ]
1515 [ PuppeteerFact ]
16- public async Task ShouldReturnProcessInstance ( )
16+ public void ShouldReturnProcessInstance ( )
1717 {
1818 var process = Browser . Process ;
1919 Assert . True ( process . Id > 0 ) ;
20+ }
21+
22+ [ PuppeteerTest ( "browser.spec.ts" , "Browser.process" , "should not return child_process for remote browser" ) ]
23+ [ PuppeteerFact ]
24+ public async Task ShouldNotReturnChildProcessForRemoteBrowser ( )
25+ {
2026 var browserWSEndpoint = Browser . WebSocketEndpoint ;
2127 var remoteBrowser = await Puppeteer . ConnectAsync (
2228 new ConnectOptions { BrowserWSEndpoint = browserWSEndpoint } , TestConstants . LoggerFactory ) ;
You can’t perform that action at this time.
0 commit comments