Skip to content

chore: roll 1.52.0 driver, implement new features #1780

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Apr 24, 2025

Closes #1753.

I don't think it's worth it to implement an entire proxy for microsoft/playwright#35389, so I didn't add a test for that.

@Skn0tt Skn0tt self-assigned this Apr 24, 2025
@Skn0tt Skn0tt changed the title chore: roll 1.52.0 driver, implement new features except glob chore: roll 1.52.0 driver, implement new features except glob and connect proxy Apr 24, 2025
@Skn0tt Skn0tt changed the title chore: roll 1.52.0 driver, implement new features except glob and connect proxy chore: roll 1.52.0 driver, implement new features except connect proxy Apr 24, 2025
@Skn0tt Skn0tt changed the title chore: roll 1.52.0 driver, implement new features except connect proxy chore: roll 1.52.0 driver, implement new features Apr 24, 2025
@Skn0tt Skn0tt requested review from yury-s and Copilot April 24, 2025 14:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR rolls the driver to 1.52.0 and introduces new features and API improvements while updating tests and documentation accordingly. Key changes include an update to the clock pause timing in tests, additions of new containsClass assertion overloads and tests, extensive refactoring of URL matching methods to use the new forGlob API with LocalUtils, and updates to APIRequest options and documentation (including browser version updates in the README).

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
TestPageClock.java Updated clock pause test with a modified timeout value and added comment for internal wait.
TestPageAriaSnapshot.java Adjusted expected snapshot strings and added new snapshot test cases.
TestLocatorAssertions.java Added tests for new containsClass assertion (both string and list overloads).
TestGlobalFetch.java Introduced a new test to verify maxRedirects behavior on context creation.
TestBrowserContextStorageState.java Updated JSON structure for indexedDB storage state handling.
Utils.java Removed obsolete globToRegex implementation, now replaced by LocalUtils method.
UrlMatcher.java Refactored method signatures to accept LocalUtils and webSocketUrl flags.
PageImpl.java Updated all URL matching calls to use the new forGlob method with additional parameters.
LocatorAssertionsImpl.java Added containsClass methods with single-string and list overloads.
LocalUtils.java Added a new globToRegex method that integrates with the messaging service.
FrameImpl.java, BrowserContextImpl.java Updated URL matching and routing invocations to use the new API.
BrowserType.java, BrowserContext.java, APIRequest.java Documentation and API option updates (e.g. maxRedirects) to match new driver version.
README.md Updated browser version numbers in documentation.
Comments suppressed due to low confidence (1)

playwright/src/test/java/com/microsoft/playwright/TestPageClock.java:395

  • [nitpick] Consider replacing the magic number '1111' with a named constant or a clearly documented variable to clarify its purpose in the test.
page.waitForTimeout(1111);

Copy link
Member

@yury-s yury-s left a comment

Choose a reason for hiding this comment

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

Looks good, but make sure that all the upstream tests are ported.

@Skn0tt
Copy link
Member Author

Skn0tt commented Apr 25, 2025

Looks good, but make sure that all the upstream tests are ported.

Done. I had LLM do the work for me. This was the prompt:

This project is a port of the Typescript version of Playwright. I'm updating it, and it's important we also update tests. I'll give you a diff of the Typescript tests. Please apply the same changes to the tests in this project, if we have corresponding tests.

<git diff release-1.51 release-1.52  -- tests/page tests/library>

Do we need to update anything else?

@Skn0tt Skn0tt requested a review from yury-s April 25, 2025 12:12
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.52
2 participants