File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ using Microsoft . AspNetCore . Http ;
2+ using System ;
3+ using System . Collections . Generic ;
4+ using System . IO ;
5+ using System . Net ;
6+ using System . Threading . Tasks ;
7+ using Xunit ;
8+ using Xunit . Abstractions ;
9+ using PuppeteerSharp . Helpers ;
10+ using PuppeteerSharp . Tests . Attributes ;
11+ using PuppeteerSharp . Xunit ;
12+
13+ namespace PuppeteerSharp . Tests . NavigationTests
14+ {
15+ [ Collection ( TestConstants . TestFixtureCollectionName ) ]
16+ public class PageReloadTests : PuppeteerPageBaseTest
17+ {
18+ public PageReloadTests ( ITestOutputHelper output ) : base ( output )
19+ {
20+ }
21+
22+ [ PuppeteerTest ( "navigation.spec.ts" , "Page.reload" , "should work" ) ]
23+ [ Fact ( Timeout = TestConstants . DefaultTestTimeout ) ]
24+ public async Task ShouldWork ( )
25+ {
26+ await Page . GoToAsync ( TestConstants . EmptyPage ) ;
27+ await Page . EvaluateFunctionAsync ( "() => (globalThis._foo = 10)" ) ;
28+ await Page . ReloadAsync ( ) ;
29+ Assert . Null ( await Page . EvaluateFunctionAsync ( "() => globalThis._foo" ) ) ;
30+ }
31+ }
32+ }
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ public WontImplementTests(ITestOutputHelper output) : base(output)
1717 [ PuppeteerTest ( "chromiumonly.spec.ts" , "Puppeteer.launch |pipe| option" , "should support the pipe option" ) ]
1818 [ PuppeteerTest ( "chromiumonly.spec.ts" , "Puppeteer.launch |pipe| option" , "should support the pipe argument" ) ]
1919 [ PuppeteerTest ( "chromiumonly.spec.ts" , "Puppeteer.launch |pipe| option" , "should fire \" disconnected\" when closing with pipe" ) ]
20+ [ PuppeteerTest ( "navigation.spec.ts" , "should not leak listeners during navigation" ) ]
21+ [ PuppeteerTest ( "navigation.spec.ts" , "should not leak listeners during bad navigation" ) ]
22+ [ PuppeteerTest ( "navigation.spec.ts" , "should not leak listeners during navigation of 11 pages" ) ]
23+ [ PuppeteerTest ( "navigation.spec.ts" , "should throw if networkidle is passed as an option" ) ]
2024 [ Fact ( Timeout = TestConstants . DefaultTestTimeout ) ]
2125 public void TheseTesstWontBeImplemented ( )
2226 {
You can’t perform that action at this time.
0 commit comments