File tree Expand file tree Collapse file tree 4 files changed +30
-42
lines changed
PuppeteerSharp.TestServer/wwwroot
PuppeteerSharp.Tests/Page Expand file tree Collapse file tree 4 files changed +30
-42
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,10 @@ The test server requires a self-signed certificate at this location: `.\lib\Pupp
1818You can run this PowerShell script on Windows
1919
2020```
21- New-SelfSignedCertificate -Subject "puppeteer" -FriendlyName "Puppeteer" -CertStoreLocation "cert:\LocalMachine\My"
22- Get-ChildItem -Path cert:\LocalMachine\my | where { $_.subject -eq "CN=puppeteer" } | Export-Certificate -FilePath .\lib\PuppeteerSharp.TestServer\testCert.cer
21+ New-SelfSignedCertificate -Subject "localhost" -FriendlyName "Puppeteer" -CertStoreLocation "cert:\CurrentUser\My"
22+
23+ Get-ChildItem -Path cert:\CurrentUSer\my | where { $_.friendlyname -eq "Puppeteer" } | Export-Certificate -FilePath C:\projects\puppeteer-sharp\lib\PuppeteerSharp.TestServer\testCert.cer
24+
2325```
2426
2527On MacOS, you can create an “SSL Client” certificate using the Keychain Access app and then export it to ` .\lib\PuppeteerSharp.TestServer\testCert.cer `
Original file line number Diff line number Diff line change 1+ version : 1.0.{build}
2+ branches :
3+ only :
4+ - master
5+ image : Previous Visual Studio 2017
6+ configuration : Release
7+ before_build :
8+ - ps : >-
9+ dotnet restore .\lib\PuppeteerSharp.sln
10+
11+ New-SelfSignedCertificate -Subject "localhost" -FriendlyName "Puppeteer" -CertStoreLocation "cert:\CurrentUser\My"
12+
13+ Get-ChildItem -Path cert:\CurrentUSer\my | where { $_.friendlyname -eq "Puppeteer" } | Export-Certificate -FilePath C:\projects\puppeteer-sharp\lib\PuppeteerSharp.TestServer\testCert.cer
14+
15+ build :
16+ project : .\lib\PuppeteerSharp.sln
17+ publish_nuget : true
18+ include_nuget_references : true
19+ verbosity : minimal
20+ test_script :
21+ - cmd : >-
22+ cd .\lib\PuppeteerSharp.Tests
23+
24+ dotnet test -s test.runsettings
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public async Task ShouldFailWhenNavigatingToBadUrl()
3434 Assert . Contains ( "Cannot navigate to invalid URL" , exception . Message ) ;
3535 }
3636
37- [ Fact ( Skip = "message is ERR_CERT_COMMON_NAME_INVALID instead of ERR_CERT_AUTHORITY_INVALID" ) ]
37+ [ Fact ]
3838 public async Task ShouldFailWhenNavigatingToBadSSL ( )
3939 {
4040 Page . RequestCreated += ( sender , e ) => Assert . NotNull ( e . Request ) ;
@@ -45,7 +45,7 @@ public async Task ShouldFailWhenNavigatingToBadSSL()
4545 Assert . Contains ( "net::ERR_CERT_AUTHORITY_INVALID" , exception . Message ) ;
4646 }
4747
48- [ Fact ( Skip = "message is ERR_CERT_COMMON_NAME_INVALID instead of ERR_CERT_AUTHORITY_INVALID" ) ]
48+ [ Fact ]
4949 public async Task ShouldFailWhenNavigatingToBadSSLAfterRedirects ( )
5050 {
5151 var exception = await Assert . ThrowsAnyAsync < Exception > ( async ( ) => await Page . GoToAsync ( TestConstants . HttpsPrefix + "/redirect/2.html" ) ) ;
You can’t perform that action at this time.
0 commit comments