-
-
Notifications
You must be signed in to change notification settings - Fork 215
refactor(e2e): modernize Playwright tests with latest APIs #2610
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
Copilot
wants to merge
13
commits into
syt/theme-refactor-1
Choose a base branch
from
copilot/fix-e45c71c5-2134-4928-bc7b-70c30c5628c4
base: syt/theme-refactor-1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
refactor(e2e): modernize Playwright tests with latest APIs #2610
Copilot
wants to merge
13
commits into
syt/theme-refactor-1
from
copilot/fix-e45c71c5-2134-4928-bc7b-70c30c5628c4
+2,540
−1,688
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…kdown syntax and `.rp-not-doc` escape hatch (#2579)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: SoonIter <[email protected]>
|
Co-authored-by: SoonIter <[email protected]>
Co-authored-by: SoonIter <[email protected]>
Co-authored-by: SoonIter <[email protected]>
Co-authored-by: SoonIter <[email protected]>
Copilot finished work on behalf of
SoonIter
September 18, 2025 14:15
c5c80fc
to
19ecfce
Compare
3b0e1ef
to
86b8ede
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors the e2e test suite to use modern Playwright APIs, improving test reliability and maintainability while keeping all functionality intact.
What Changed
Modernized 4 key e2e test files by replacing deprecated Playwright patterns with current best practices:
e2e/utils/search.ts
- Core search utility used across multiple test filese2e/fixtures/basic/index.test.ts
- Main functionality tests (dark mode, navigation, styles)e2e/fixtures/production/index.test.ts
- Production build validatione2e/fixtures/no-config-root/index.test.ts
- Configuration-less project testsKey Improvements
API Modernization
page.$()
withpage.locator()
- More robust element selectionpage.evaluate()
calls - Using direct locator methods insteadawait expect(locator)
for better error messagesEnhanced Reliability
page.waitForLoadState()
andwaitFor()
instead of hardcoded timeoutslocator.fill()
andlocator.clear()
instead of keyboard eventstoHaveClass()
for theme testingDeveloper Experience
Example of Changes
Before (deprecated pattern):
After (modern pattern):
Benefits
All changes maintain 100% backward compatibility while bringing the test suite up to current Playwright standards (v1.55.0).
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com
/usr/lib/apt/methods/https
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Created from VS Code via the GitHub Pull Request extension.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.