Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(roll): roll Playwright to 1.48.0-beta-1728034490000 #2584

Merged
merged 6 commits into from
Oct 21, 2024

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented Oct 7, 2024

Fixes #2580

  • Port tests over to sync test suite

@@ -280,6 +287,21 @@ def listen(self, factory: http.HTTPFactory) -> None:


class WebSocketProtocol(WebSocketServerProtocol):
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
self.events = EventEmitter()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this basically rewrites onMessage and onClose to an easier to consume pyee event emitter.

@@ -405,7 +404,8 @@ async def _inner_fetch(
"fetch",
{
"url": url,
"params": params_to_protocol(params),
"params": object_to_array(params) if isinstance(params, dict) else None,
"encodedParams": params if isinstance(params, str) else None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen this change in .net or java roll for some reason. Could you please double check?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Java we don't allow passing query params as strings while in JS/Python/.NET we do. There is no .NET roll yet for this release after we moved the merge logic to the server side.

In Java we have:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not do it in the ports to keep the API surface smaller, especially if there is no user request for this.

playwright/_impl/_network.py Outdated Show resolved Hide resolved
playwright/_impl/_network.py Outdated Show resolved Hide resolved
playwright/_impl/_tracing.py Show resolved Hide resolved
from tests.server import Server, WebSocketProtocol


async def assert_equal(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we need expect.poll() in python :)

tests/async/test_route_web_socket.py Outdated Show resolved Hide resolved
@mxschmitt mxschmitt merged commit b807406 into microsoft:main Oct 21, 2024
41 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Ports]: Backport client side changes for 1.49
4 participants