File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
PuppeteerSharp.Tests/Issues 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 Xunit ;
3+ using Xunit . Abstractions ;
4+ using System . Linq ;
5+
6+ namespace PuppeteerSharp . Tests . Issues
7+ {
8+ [ Collection ( "PuppeteerLoaderFixture collection" ) ]
9+ public class Issue0343 : PuppeteerPageBaseTest
10+ {
11+ public Issue0343 ( ITestOutputHelper output ) : base ( output )
12+ {
13+ }
14+
15+ [ Fact ]
16+ public async Task ShouldSupportLongExpiresValueInCookies ( )
17+ {
18+ await Page . GoToAsync ( TestConstants . EmptyPage ) ;
19+ var longExpiresValue = 3677410981.1125112d ;
20+ await Page . SetCookieAsync ( new CookieParam
21+ {
22+ Name = "password" ,
23+ Value = "123456" ,
24+ Expires = longExpiresValue
25+ } ) ;
26+ var cookies = await Page . GetCookiesAsync ( ) ;
27+ Assert . Equal ( longExpiresValue , cookies . First ( c => c . Name == "password" ) . Expires ) ;
28+ }
29+ }
30+ }
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public class CookieParam
4545 /// </summary>
4646 /// <value>Expiration.</value>
4747 [ JsonProperty ( "expires" , NullValueHandling = NullValueHandling . Ignore ) ]
48- public int ? Expires { get ; set ; }
48+ public double ? Expires { get ; set ; }
4949 /// <summary>
5050 /// Gets or sets the size.
5151 /// </summary>
You can’t perform that action at this time.
0 commit comments