Skip to content

A browser-test layer: Playwright against a real Nextcloud - #2176

Open
karlitschek wants to merge 2 commits into
masterfrom
test/e2e-browser
Open

A browser-test layer: Playwright against a real Nextcloud#2176
karlitschek wants to merge 2 commits into
masterfrom
test/e2e-browser

Conversation

@karlitschek

Copy link
Copy Markdown
Member

Item 11 of the fresh look, third part. 1,500 unit tests and an integration suite could not see a page that stays empty because a bundle did not load, a route answered the wrong shape, or a dialog never closed — this can.

What is here

tests/e2e/ (Playwright, Chromium), five smoke tests that do what a person does in their first five minutes, against a real Nextcloud with the app installed and the committed bundle in js/ — nothing mocked:

  1. sign in through Nextcloud's own login form, open the app: sidebar entries and the feed are there, the New post button too;
  2. write a post in the dialog → the dialog closes and the post is the newest thing in My Feed;
  3. Discover has its switcher with People and Starter packs;
  4. the timeline switcher moves between Global and Local (URL follows);
  5. a Nextcloud group the account is in is a list in the sidebar, and opens as its own timeline headed with the group's name (E2E_GROUP; skipped when unset).

.github/workflows/e2e.yml sets up a throwaway server for every pull request — stable35, SQLite, the app enabled, a second user and a design group — runs the suite, and keeps the Playwright report and traces as an artifact when something fails.

Locally: npx playwright install chromium, then E2E_BASE_URL=… E2E_USER=… E2E_PASSWORD=… npm run test:e2e. Paths are resolved under the base URL, so an instance at /nextcloud works like one at the root (that was the first thing the run against devel caught). npm run lint covers tests/e2e too.

Verification

  • Run green against devel as sofia (5 passed, 1.5 min) before committing — including the group list, which Nextcloud groups as Social lists #2169 put there.
  • The workflow itself runs for the first time on this PR; if the throwaway server needs a tweak (trusted domain, PHP version), that shows up here and I'll fix it on the branch.
  • @playwright/test is a devDependency only; the bundle is unchanged apart from the version. README documents the suite; Technical-Debt.md's "since then" records it.

Version 0.19.40.

🤖 Generated with Claude Code

Frank Karlitschek and others added 2 commits September 14, 2026 02:15
1,500 unit tests and an integration suite could not see a page that stays
empty because a bundle did not load, a route answered the wrong shape or a
dialog never closed; this can. tests/e2e/ signs in through Nextcloud's own
login form, opens the app, checks the sidebar and the feed, writes a post in
the dialog and sees it arrive, walks the Discover page, switches scopes and
opens a group list -- in Chromium, against the committed bundle in js/,
with nothing mocked.

.github/workflows/e2e.yml sets up a throwaway server (stable35, SQLite, a
second user and a group) for every pull request and keeps the Playwright
report when something fails. Locally: npm run test:e2e, pointed at any
instance with E2E_BASE_URL / E2E_USER / E2E_PASSWORD; paths are resolved
under the base, so an instance at /nextcloud works like one at the root.

Run green against devel (5 of 5) before this commit.

Signed-off-by: Frank Karlitschek <frank@nextcloud.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Frank Karlitschek <frank@nextcloud.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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