Files
computer-playbook/roles/web-app-friendica/files/playwright/playwright.spec.js
kevinveenbirkenbachandClaude Opus 4.7 f578e3c3a0 refactor(web-app-{fediwall,friendica}): split playwright spec into per-test modules; add friendica anonymous-profile-view + admin-follow-biber
Split each role's playwright.spec.js into `_shared.js` (env, login/post
helpers, lifecycle hook) plus one `test-*.js` per scenario, registered
from the orchestrator via `require().register(shared)` — matches the
pattern already used by web-app-pixelfed and web-app-taiga so each test
stays atomar and individually inspectable.

Adds two new friendica tests:
- test-anonymous-profile-view.js: pins the oauth2-proxy ACL whitelist
  for `/profile/` by asserting an anonymous visitor reaches biber's
  profile without being bounced to Keycloak. Materialises the friendica
  user row through the LDAP login path first since the profile would
  otherwise 404.
- test-admin-follow-biber.js: exercises the local-instance follow flow
  end-to-end (POST `/contact/follow` → 302 → `/contact/<id>` with
  biber's nick@host on the contact detail page).

Also extends `web-app-friendica/meta/services.yml` `services.oauth2.acl`
with the whitelist surfaces (federation/discovery, public profile +
community feed, theme assets, instance-info pages) the new
anonymous-profile-view test pins.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 01:09:02 +02:00

20 lines
732 B
JavaScript

// Friendica Playwright spec — orchestration only. Shared env vars,
// login/logout flow helpers, variant selection, and the biber-account
// provisioning helper live in `_shared.js`; each scenario is registered
// from its own `test-*.js` companion module so each test stays atomar
// and individually inspectable.
const { test } = require("@playwright/test");
const shared = require("./_shared");
test.use({
ignoreHTTPSErrors: true,
});
require("./test-guest-persona").register(shared);
require("./test-native-login-administrator").register(shared);
require("./test-side-by-side-sessions").register(shared);
require("./test-anonymous-profile-view").register(shared);
require("./test-admin-follow-biber").register(shared);