Skip to content

test(e2e): run a suite against a local PlaceOS stack - #326

Merged
MrYuion merged 3 commits into
developfrom
e2e/local-stack
Oct 21, 2026
Merged

MrYuion merged 3 commits into
developfrom
e2e/local-stack

Conversation

@MrYuion

@MrYuion MrYuion commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Problem

The e2e suite only runs against the mock backend. Nothing tests the app against a real PlaceOS backend, so a backend change or a sign-in regression is not caught.

Solution

A second Playwright suite that runs against an isolated PlaceOS stack in Docker. It is adapted from the PlaceOS/user-interfaces e2e stack.

e2e/stack/up.sh        # --fresh: remove its data first
bun run e2e:local
e2e/stack/down.sh      # --volumes: remove its data
  • Stack (e2e/stack/): its own compose project, backoffice-e2e, on ports 9543 and 9180. It runs beside PlaceOS/local and the user-interfaces stack. It has no core, drivers or MQTT, so no module starts.
  • Seed and sign-in (e2e/support/): a Playwright setup project seeds the stack (safe to re-run) and signs in through the API (OAuth code + PKCE). The seed adds an OAuth app for the dev server, an absolute authority login_url and a non-admin user. The config refuses a backend that is not on a loopback host.
  • Specs (e2e/src/local/): sign-in through the real login form; an admin opens domains and a non-admin gets the 403 page; create, rename and delete a zone, checked through the API. The mock config ignores this folder.
  • App fix (src/app/common/placeos.ts): the /backoffice route was only dropped on localhost:4200. On another port, sign-in broke because the redirect_uri pointed under /backoffice/, which the dev proxy sends to the backend. Now any localhost dev server that serves the app at the root uses ${origin}/oauth-resp.html.
  • CI (.github/workflows/e2e-local.yml): an advisory job on a self-hosted runner with the label placeos-e2e. There is no pull_request trigger, because this repository is public. Do not make it a required check yet.

Testing

  • e2e/stack/up.sh --fresh, then bun run e2e:local: 7 passed (also with CI=true; the step summary renders).
  • Red checks: the zone delete and 403 assertions fail when the behaviour breaks. The new unit test fails on the old route logic.
  • vitest (placeos.spec), tsc -p e2e/tsconfig.json and eslint pass. actionlint reports only the custom runner label.
  • The workflow has not run on a real runner yet. The placeos-e2e runner must be registered for this repository first (see "CI" in e2e/README.md).

Reviewed with sol-loop: 1 round with GPT-6.1-Sol.

Changes made by Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

MrYuion and others added 3 commits October 21, 2026 18:58
The `/backoffice` route was only dropped on localhost:4200. On another
port the redirect_uri pointed under `/backoffice/`, which the dev proxy
sends to the backend, so sign-in failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds an isolated compose stack (e2e/stack, project backoffice-e2e on
9543/9180), an idempotent API seed, headless PKCE sign-in, and specs
for login, admin access and zone CRUD checked through the API.
Adapted from the PlaceOS/user-interfaces e2e stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Advisory only. No pull_request trigger, because the repository is public
and the runner is self-hosted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
backoffice Ready Ready Preview Oct 21, 2026 7:59am UTC

@MrYuion
MrYuion merged commit aca32cb into develop Oct 21, 2026
7 of 8 checks passed
@MrYuion
MrYuion deleted the e2e/local-stack branch October 21, 2026 22:46

This branch was successfully deployed

1 active deployment
Preview — bc3bd3cd Deployed Oct 21, 2026 by vercel[bot]
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