Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ BROWSER=FIREFOX PROTOCOL=bidi dotnet build PuppeteerSharp.Tests/PuppeteerSharp.T

You can switch between CDP and Bidi by changing the PuppeteerTestAttribute.IsCdp property.
You can switch between Chrome and Firefox by changing the PuppeteerTestAttribute.IsChrome property.
If you are fixing one single test, then you must run the entire test suite to confirm that you didn't break other tests.

## Utilities and Helpers

Expand Down
15 changes: 9 additions & 6 deletions lib/PuppeteerSharp.Nunit/PuppeteerTestAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,19 @@ private bool ShouldSkipByExpectation(Test test, out TestExpectation output)
// Join local and upstream in one variable
var allExpectations = localExpectations.Concat(upstreamExpectations).ToArray();

var testIdStr = ToString();

foreach (var expectation in allExpectations)
{
if (expectation.TestIdRegex.IsMatch(ToString()))
if (expectation.TestIdRegex.IsMatch(testIdStr))
{
if (expectation.Platforms.Contains(currentExpectationPlatform) &&
expectation.Parameters.All(parameters.Contains) &&
(
expectation.Expectations.Contains(TestExpectation.TestExpectationResult.Skip) ||
var platformMatch = expectation.Platforms.Contains(currentExpectationPlatform);
var paramsMatch = expectation.Parameters.All(parameters.Contains);
var expMatch = expectation.Expectations.Contains(TestExpectation.TestExpectationResult.Skip) ||
expectation.Expectations.Contains(TestExpectation.TestExpectationResult.Fail) ||
expectation.Expectations.Contains(TestExpectation.TestExpectationResult.Timeout)))
expectation.Expectations.Contains(TestExpectation.TestExpectationResult.Timeout);

if (platformMatch && paramsMatch && expMatch)
{
output = expectation;
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
[
{
"comment": "Firefox BiDi sends duplicate beforeRequestSent events with different request IDs for speculative/parallel loading during navigation",
"testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should be abortable",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["FAIL"]
},
{
"comment": "Firefox BiDi sends duplicate beforeRequestSent events with different request IDs for speculative/parallel loading during navigation",
"testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should work with encoded server - 2",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["FAIL"]
},
{
"comment": "Firefox BiDi sends duplicate beforeRequestSent events with different request IDs for speculative/parallel loading during navigation",
"testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should work with redirects for subresources",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["FAIL"]
},
{
"comment": "Test depends on ConnectAsync which is not implemented for BiDi yet - see [connect.spec] expectations",
"testIdPattern": "[browser.spec] Browser.isConnected should set the browser connected state",
Expand Down Expand Up @@ -1064,21 +1085,6 @@
"FAIL"
]
},
{
"comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one",
"testIdPattern": "[requestinterception.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": "[target.spec] *",
Expand Down

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions lib/PuppeteerSharp.Tests/TestConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public static class TestConstants
{
public const int DebuggerAttachedTestTimeout = 300_000;
public const int DefaultPuppeteerTimeout = 10_000;
public const int Port = 8081;
public const int Port = 7081;
public const int HttpsPort = Port + 1;
public const string ServerUrl = "http://localhost:8081";
public const string ServerIpUrl = "http://127.0.0.1:8081";
public const string HttpsPrefix = "https://localhost:8082";
public const string ServerUrl = "http://localhost:7081";
public const string ServerIpUrl = "http://127.0.0.1:7081";
public const string HttpsPrefix = "https://localhost:7082";
public const string AboutBlank = "about:blank";
public static readonly string CrossProcessHttpPrefix = "http://127.0.0.1:8081";
public static readonly string CrossProcessHttpsPrefix = "https://127.0.0.1:8082";
public static readonly string CrossProcessHttpPrefix = "http://127.0.0.1:7081";
public static readonly string CrossProcessHttpsPrefix = "https://127.0.0.1:7082";
public static readonly string EmptyPage = $"{ServerUrl}/empty.html";
public static readonly string CrossProcessUrl = ServerIpUrl;
public static readonly bool IsChrome = PuppeteerTestAttribute.IsChrome;
Expand Down
Loading
Loading