Files
computer-playbook/roles/web-app-nextcloud/files/playwright/test-guest-persona.js
kevinveenbirkenbach 8f828bb168 refactor(web-app-nextcloud): split playwright spec into per-test modules + add flavor-gated admin/biber login coverage
Mirror the taiga/pixelfed pattern: `playwright.spec.js` shrinks from a
834-LOC monolith to a 28-LOC orchestrator that wires `beforeEach` and
require()s one test module per scenario; all shared env, locator,
modal, login/logout and Talk-admin verification logic moves to
`_shared.js`. Each test stays atomar and individually inspectable via
its filename.

Login coverage is now persona × flavor instead of one monolithic
"nextcloud login" that implicitly assumed OIDC:

- test-login-admin-oidc.js   skip \!oidcEnabled
- test-login-admin-native.js skip oidcEnabled       (uses
                                                     NEXTCLOUD_DIRECT_LOGIN_PASSWORD
                                                     via the shared
                                                     login helper)
- test-login-biber-oidc.js   skip \!oidcEnabled
- test-login-biber-ldap.js   skip oidcEnabled || \!ldapEnabled (biber is
                                                     not autoprovisioned
                                                     in pure-native NC)

Persona scenarios (guest / biber / administrator post-login flows) keep
delegating to the shared `runGuestFlow` / `runBiberFlow` / `runAdminFlow`
helpers and stay universal across all variants.

Also drops an unused helper (`enterNextcloudLoginThroughVisibleEntryPoint`)
that the deleted always-on `test-nextcloud-login.js` was the only
consumer of.
2026-05-18 01:09:01 +02:00

8 lines
225 B
JavaScript

const { test } = require("@playwright/test");
exports.register = function (shared) {
test("guest: public-landing → auth chain → never authenticated", async ({ page }) => {
await shared.runGuestFlow(page);
});
};