Skip to content

test: add Playwright smoke tests for the settings pages and the dashboard widgets - #214

Merged
oleksandr-nc merged 2 commits into
mainfrom
test/playwright-smoke-tests
Sep 21, 2026
Merged

oleksandr-nc merged 2 commits into
mainfrom
test/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 widgets fixed in #212 passed CI for exactly that reason. This adds a Playwright suite that runs the built app in a real Nextcloud, and a unit test for the endpoint behind the widgets.

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. PLAYWRIGHT_BASE_URL points the suite at an existing instance instead.

The settings pages and both dashboard widgets are covered

The tests check that the admin section renders its fields and that the link preview switch round-trips through /sensitive-admin-config, that the personal section offers both ways to connect an account, that both widgets ask a user without a Jira account to connect one, and that the notifications widget lists an issue 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.

A unit test covers the endpoint the widgets ask

JiraAPIControllerTest pins the two answers of getNotifications(): 400 for a user who has connected no account, which is how the widgets learn to show their connect prompt, and the issue list for a user who has.

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 widgets

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 round-trips through the
API, and that both dashboard widgets ask users without a Jira account to
connect one and list issues once notifications arrive. 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>
The endpoint has to answer 400 for a user who has connected no account,
because that is how the dashboard widgets learn to show their connect
prompt.

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
@oleksandr-nc
oleksandr-nc merged commit 210e86f into main Sep 21, 2026
24 checks passed
@oleksandr-nc
oleksandr-nc deleted the test/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