Skip to content

chore: mirror js tests and implementation - #3270

Closed
Pavel Feldman (pavelfeldman) wants to merge 3 commits into
microsoft:mainfrom
pavelfeldman:full-mirror
Closed

Pavel Feldman (pavelfeldman) wants to merge 3 commits into
microsoft:mainfrom
pavelfeldman:full-mirror

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

No description provided.

Port every test in upstream's tests/registry.md to tests/async and
tests/sync, named after its id and title, or list it in
tests/upstream_not_ported.txt with the reason.
scripts/check_test_registry.py checks this in CI. The older tests move
to tests/{async,sync}/legacy.

Fix the client bugs that the ports found, so that the same tests pass
as with Node.js, and roll the driver to 1.65.0-alpha-2026-10-17.
CI runs the tests in parallel with pytest-xdist, on fewer bots.
test.sh runs the library tests under xvfb.
Compare playwright/_impl with packages/playwright-core/src/client file by
file and resolve the deviations in favor of JS: logic and order of
operations, protocol calls and parameters, guards, error messages, and
helpers with their modules. The generated channels pass the protocol's
internal flag, as getMetainfo() does. Python-only machinery stays: the
sync API, the expect_* context managers, and stack capture.

Among the bugs fixed on the way: a failed raw headers call hung later
calls; route times=0 meant unlimited; route.continue_(headers={}) kept
the headers; await on the server side of a WebSocket route raised
TypeError; a sync route_web_socket handler could not call the API;
detached frames stayed in child_frames; rewriting an error could raise
TypeError and leave a wait hanging.
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.

1 participant