Skip to content

test: add Playwright smoke tests for the settings pages and the dashboard widget - #246

Merged
oleksandr-nc merged 1 commit into
mainfrom
tests/playwright-smoke-tests
Sep 21, 2026
Merged

oleksandr-nc merged 1 commit into
mainfrom
tests/playwright-smoke-tests

Conversation

@oleksandr-nc

Copy link
Copy Markdown
Contributor

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.mjs starts the Nextcloud test container of @nextcloud/e2e-test-server with this app mounted and enabled, the same setup the activity app uses. The workflow also installs the composer dependencies, because the app loads league/commonmark at runtime. PLAYWRIGHT_BASE_URL points 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.xml through 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)

  • The content of this PR was partly or fully generated using AI

…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>
@oleksandr-nc
oleksandr-nc merged commit 337fbb6 into main Sep 21, 2026
39 checks passed
@oleksandr-nc
oleksandr-nc deleted the tests/playwright-smoke-tests branch September 21, 2026 08:19
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