refactor(tests): migrate e2e test suite from Cypress to Playwright#2603
Open
miaulalala wants to merge 6 commits into
Open
refactor(tests): migrate e2e test suite from Cypress to Playwright#2603miaulalala wants to merge 6 commits into
miaulalala wants to merge 6 commits into
Conversation
4a62607 to
f2e1e9a
Compare
Replaces the Cypress setup with @playwright/test + @nextcloud/e2e-test-server. All 9 existing tests pass locally. The comment activity test remains skipped pending a fix to the comments app (pre-existing skip from the Cypress suite). Key changes: - Add playwright.config.ts with managed Docker server via start-server.mjs - Rewrite e2e helpers (filesUtils, sidebarUtils) using Playwright APIs - Fix: replace CSS.escape() (browser-only API) with a Node-safe cssEscape() - Fix: hover file row before clicking Actions to ensure dropdown opens - Fix: skip disabled checkboxes in settings test (email disabled without SMTP) - Fix: use numeric values for frequency select assertions (Weekly=2, Hourly=0) - Add GitHub Actions workflow (playwright.yml), remove cypress.yml - Remove all Cypress dependencies and config files Signed-off-by: Anna Larch <anna@nextcloud.com> AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f2e1e9a to
745ded5
Compare
Screenshots are being rebuilt centrally in the nextcloud/documentation repo for the entire NC suite. Signed-off-by: Anna Larch <anna@nextcloud.com> AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Covers the activity stream page (entry rendering, heading/filter navigation, RSS feed toggle) and the admin settings page (email enable toggle visibility, default settings grid, and persistence across page reloads). Signed-off-by: Anna Larch <anna@nextcloud.com> AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
Author
|
Needs an update for the branch protection rules - the cypress summary is still required there and can go immediately after. |
susnux
reviewed
May 19, 2026
susnux
reviewed
May 19, 2026
susnux
reviewed
May 19, 2026
susnux
reviewed
May 19, 2026
Replaces the `url:` health-check with `wait: { stdout: /Nextcloud ready at/ }`
so Playwright waits for the explicit ready signal from start-server.mjs
rather than polling the HTTP port, which can respond before Nextcloud
finishes booting and cause flaky test starts.
Also adds gracefulShutdown so the start-server process is cleanly
terminated when Playwright exits.
Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
Author
|
Thanks @susnux! Switched to |
susnux
reviewed
May 19, 2026
susnux
reviewed
May 19, 2026
susnux
reviewed
May 19, 2026
susnux
reviewed
May 19, 2026
- Bump @playwright/test 1.49 → 1.60 - Enable fullyParallel, reduce CI retries to 1, keep workers: 1 (single container SQLite can't safely handle concurrent test sessions) - Switch CI reporter to blob+dot+github; add merge-reports job so failed runs produce a downloadable HTML report - Add SIGTERM/SIGINT handlers to start-server.mjs to cleanly stop the container in CI; locally the container is left running for reuse - Add Nextcloud log dump step on CI failure Signed-off-by: Anna Larch <anna@nextcloud.com> AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Disable the app store to prevent external requests during tests - Enable SQLite WAL mode with busyTimeout(5000) for better concurrency - Initialize cron upfront so background jobs are seeded before tests run Workers stays at 1: even with WAL mode, concurrent sessions for the same admin user cause Nextcloud-level 500s, so parallelism isn't safe with this container setup. Signed-off-by: Anna Larch <anna@nextcloud.com> AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
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.
Summary
@nextcloud/cypresswith@playwright/test+@nextcloud/e2e-test-serverMotivation
Cypress CI has been flaky enough to block dependabot auto-merge. Playwright's architecture (no iframes, direct browser protocol) is more reliable, and
@nextcloud/e2e-test-serveralready ships a Playwright integration that handles Docker container management and user creation.Key technical decisions
start-server.mjs: spins up an isolated Docker container on port 8081;reuseExistingServerlets local runs skip the Docker step if the container is already upbaseURLtrailing slash:index.php/(with slash) is required for the login helper's Origin header constructionapps/activity/all(without/) lets Playwright prepend theindex.php/base, which the Vue Router requires to match its routescssEscape()helper:CSS.escape()is a browser-only API; replaced with a Node-safe equivalent for attribute selector escapinghover()before Actions click: file rows only fully activate the Actions button on hover; without it the dropdown can silently fail to openforattribute; must click the.checkbox-radio-switchwrapper instead oflabel[for="..."]Test plan
playwright.ymlreplacescypress.yml)🤖 Generated with Claude Code