Skip to content

test(e2e): Playwright suite for the full account lifecycle - #162

Merged
skjnldsv merged 3 commits into
mainfrom
feature/e2e-playwright
Jul 2, 2026
Merged

skjnldsv merged 3 commits into
mainfrom
feature/e2e-playwright

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Jul 1, 2026 •

Copy link
Copy Markdown
Member

Scenarios covered

  • Account signup (happy path) — request an account via the OCS API → open the returned set-password page → set a password → auto-login → follow the emailed verification link → account is enabled and moved from the unconfirmed group to the confirmed group.
  • Client flow (V3) — submitting the password with flow=V3 renders the nc:// flow-login page for desktop/mobile clients.
  • Client flow (OCS-APIREQUEST) — submitting with the OCS client header redirects to the nc://login/… app-password URL.
  • Self-service reactivation — an account auto-disabled by the app (pp_disabled) reactivates itself through the public /reactivate form, receives a fresh verification mail, and re-verifies.
  • Reactivation guard — an account disabled by an admin (no pp_disabled flag) is NOT reactivatable through the self-service form (identical response, stays disabled — no enumeration).
  • User login — a user can log in through the standard web UI.
  • Admin settings access — an admin can open the app's admin settings page (token + group sections render).

Also included

  • fix(settings): admin-settings.js rewritten dependency-free (jQuery / underscore / OC.linkToOCS are gone from the modern server bundle, so the reset-token button and group selectors were dead on NC 32+). The admin scenario now exercises the reset round-trip end-to-end.

This PR was developed with AI assistance (Claude Code, claude-opus-4-8); the commit carries an Assisted-by: trailer. I have reviewed and run the suite and take authorship of it.

@skjnldsv skjnldsv added the enhancement New feature or request label Jul 1, 2026
@skjnldsv
skjnldsv force-pushed the feature/e2e-playwright branch 2 times, most recently from 12a8cf9 to b8f4756 Compare July 1, 2026 19:54
@skjnldsv skjnldsv self-assigned this Jul 2, 2026
@skjnldsv
skjnldsv force-pushed the feature/e2e-playwright branch from b8f4756 to 1aad84a Compare July 2, 2026 08:47
skjnldsv added 2 commits July 2, 2026 10:53
The admin settings script relied on jQuery ($), underscore (_.debounce) and
OC.linkToOCS, none of which are part of the default server bundle on Nextcloud
32+, so the whole script threw and the reset-token button and group selectors
were dead. Rewrite it dependency-free using vanilla DOM + fetch (OCS calls with
the request token), preserving the debounced reset-token and group-save behaviour.

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Browser-driven end-to-end tests covering the whole preferred_providers flow,
using the @nextcloud/e2e-test-server Docker harness (server on :8089) plus a
Mailpit sidecar to capture the verification/reactivation emails.

Scenarios: signup → set password → auto-login → verify email → group move; the
V3 and OCS-APIREQUEST client branches; self-service reactivation + re-verify and
the admin-disabled-not-reactivatable guard; a user login; and admin settings
access + provider-token reset.

- start-nextcloud-server.mjs boots the server, enables the app, provisions the
  provider token + groups via occ, and wires SMTP to Mailpit on a shared
  user-defined network.
- support/: occ helpers, a Mailpit client and an OCS request-account helper.
- CI: separate, non-blocking playwright.yml matrix over the supported server
  range (derived from info.xml via nextcloud-version-matrix) plus master.

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv
skjnldsv force-pushed the feature/e2e-playwright branch from 1aad84a to 98b546b Compare July 2, 2026 08:53
The property-promotion cleanup (#161) migrated ExpireUserTrait and
ExpireUnverifiedAccounts off the removed $appName property to
Application::APP_ID, but missed the pp_disabled line added by the reactivation
feature. Left as $this->appName it referenced an undefined property, so the
expire background job fatally errored at runtime (and psalm/phpunit flagged it).

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv
skjnldsv merged commit c3b003e into main Jul 2, 2026
43 checks passed
@skjnldsv
skjnldsv deleted the feature/e2e-playwright branch July 2, 2026 09:04
@skjnldsv skjnldsv mentioned this pull request Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant