diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json index 819257eac..adb879ede 100644 --- a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json +++ b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json @@ -665,21 +665,6 @@ "FAIL" ] }, - { - "comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one", - "testIdPattern": "[acceptInsecureCerts.spec] *", - "platforms": [ - "darwin", - "linux", - "win32" - ], - "parameters": [ - "webDriverBiDi" - ], - "expectations": [ - "FAIL" - ] - }, { "comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one", "testIdPattern": "[injected.spec] *", diff --git a/lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/AcceptInsecureCertsTests.cs b/lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/AcceptInsecureCertsTests.cs index 2f1937946..85cf3a298 100644 --- a/lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/AcceptInsecureCertsTests.cs +++ b/lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/AcceptInsecureCertsTests.cs @@ -39,7 +39,7 @@ public async Task ShouldWorkWithMixedContent() }); await Page.GoToAsync(TestConstants.HttpsPrefix + "/mixedcontent.html", new NavigationOptions { - WaitUntil = new[] { WaitUntilNavigation.Load } + WaitUntil = [WaitUntilNavigation.Load] }); Assert.That(Page.Frames, Has.Length.EqualTo(2)); // Make sure blocked iframe has functional execution context diff --git a/lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/ResponseSecurityDetailsTests.cs b/lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/ResponseSecurityDetailsTests.cs index 8c9f26d3d..4e7e9bb50 100644 --- a/lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/ResponseSecurityDetailsTests.cs +++ b/lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/ResponseSecurityDetailsTests.cs @@ -16,26 +16,29 @@ public ResponseSecurityDetailsTests() : base() DefaultOptions.AcceptInsecureCerts = true; } - [Test, PuppeteerTest("acceptInsecureCerts.spec", "Response.securityDetails", "Should Work")] + [Test, PuppeteerTest("acceptInsecureCerts.spec", "acceptInsecureCerts Response.securityDetails", "should work")] public async Task ShouldWork() { - // Checking for the TLS socket is it is in upstreams proves to be flaky in .net framework. + // Checking for the TLS socket is it is in upstreams proves to be flaky in .NET Framework. // We don't need to test that here. var response = await Page.GoToAsync(TestConstants.HttpsPrefix + "/empty.html"); - Assert.That(response.Status, Is.EqualTo(HttpStatusCode.OK)); - Assert.That(response.SecurityDetails, Is.Not.Null); + Assert.Multiple(() => + { + Assert.That(response.Status, Is.EqualTo(HttpStatusCode.OK)); + Assert.That(response.SecurityDetails, Is.Not.Null); + }); Assert.That(response.SecurityDetails.Protocol, Does.Contain("TLS")); } - [Test, PuppeteerTest("acceptInsecureCerts.spec", "Response.securityDetails", "should be |null| for non-secure requests")] + [Test, PuppeteerTest("acceptInsecureCerts.spec", "acceptInsecureCerts Response.securityDetails", "should be |null| for non-secure requests")] public async Task ShouldBeNullForNonSecureRequests() { var response = await Page.GoToAsync(TestConstants.EmptyPage); Assert.That(response.SecurityDetails, Is.Null); } - [Test, PuppeteerTest("acceptInsecureCerts.spec", "Response.securityDetails", "Network redirects should report SecurityDetails")] + [Test, PuppeteerTest("acceptInsecureCerts.spec", "acceptInsecureCerts Response.securityDetails", "Network redirects should report SecurityDetails")] [Ignore("This is super flaky")] public async Task NetworkRedirectsShouldReportSecurityDetails() { @@ -55,10 +58,13 @@ await Task.WhenAll( var response = responseTask.Result; - Assert.That(responses, Has.Count.EqualTo(2)); - Assert.That(responses[0].Status, Is.EqualTo(HttpStatusCode.Found)); - Assert.That(TestUtils.CurateProtocol(response.SecurityDetails.Protocol), - Is.EqualTo(TestUtils.CurateProtocol(requestTask.Result.ToString()))); + Assert.Multiple(() => + { + Assert.That(responses, Has.Count.EqualTo(2)); + Assert.That(responses[0].Status, Is.EqualTo(HttpStatusCode.Found)); + Assert.That(TestUtils.CurateProtocol(response.SecurityDetails.Protocol), + Is.EqualTo(TestUtils.CurateProtocol(requestTask.Result.ToString()))); + }); } } }