test: add Playwright smoke tests for the settings pages and the dashboard widget - #246
Merged
Merged
Conversation
…oard widget CI builds the frontend but never runs it, so a change that breaks a page at runtime, like a dependency update or a global Nextcloud no longer provides, passes with every check green. The suite runs the built app in the Nextcloud test container of @nextcloud/e2e-test-server, checks that the admin and personal settings sections render and that the link preview switch of each round-trips through the API, and that the dashboard widget asks users without a GitHub account to connect one. It fails on any uncaught exception or unexpected failing request of the app. CI runs it against the oldest and the newest server the app supports. Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.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.
CI builds the frontend but never runs it, so a change that breaks a page at runtime, such as a dependency update or a global that Nextcloud no longer provides, goes through with every check green. The empty dashboard widget fixed in #243 passed CI for exactly that reason. This adds a Playwright suite that runs the built app in a real Nextcloud.
The suite runs the app in a real Nextcloud
playwright/start-server.mjsstarts the Nextcloud test container of@nextcloud/e2e-test-serverwith this app mounted and enabled, the same setup the activity app uses. The workflow also installs the composer dependencies, because the app loadsleague/commonmarkat runtime.PLAYWRIGHT_BASE_URLpoints the suite at an existing instance instead.The settings pages and the dashboard widget are covered
The tests check that the admin and personal settings sections render, that the link preview switch of each round-trips through its API, that the widget asks a user without a GitHub account to connect one, and that it lists a notification once the API answers with one. Every test also fails on an uncaught exception and on a failing request to one of the app's own routes, so a component that throws while loading turns the suite red.
CI runs it against the oldest and the newest supported server
The workflow takes both ends of the version range from
info.xmlthrough the version matrix action, currently stable33 and master. It also runs on pushes to main, so the combined result of several merged pull requests is tested as well.🤖 AI (if applicable)