mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
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>
31 lines
1.3 KiB
JavaScript
31 lines
1.3 KiB
JavaScript
// Fediwall Playwright spec — orchestration only. Shared env vars, login
|
|
// helpers (Mastodon OIDC + Friendica ldapauth + post-on-Friendica /compose
|
|
// flow), and the wall-content assertion helpers 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 });
|
|
|
|
test.beforeEach(shared.beforeEach);
|
|
|
|
// Baseline scenarios — MUST pass even when every shared service is disabled.
|
|
require("./test-fediwall-root-tls").register(shared);
|
|
require("./test-fediwall-default-slug").register(shared);
|
|
require("./test-fediwall-html-content").register(shared);
|
|
require("./test-fediwall-wall-config").register(shared);
|
|
require("./test-fediwall-spa-mount").register(shared);
|
|
|
|
// Cross-Fediverse scenario — requires Mastodon AND Friendica.
|
|
require("./test-walls-surface-posts").register(shared);
|
|
|
|
// Persona scenarios. Bodies live in the shared helper
|
|
// roles/test-e2e-playwright/files/personas.js so every role's persona
|
|
// flow stays consistent.
|
|
require("./test-guest-persona").register(shared);
|
|
require("./test-biber-persona").register(shared);
|
|
require("./test-administrator-persona").register(shared);
|