Repository navigation
test(e2e): run a suite against a local PlaceOS stack - #326
Merged
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-interfacese2e 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.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 authoritylogin_urland a non-admin user. The config refuses a backend that is not on a loopback host.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.src/app/common/placeos.ts): the/backofficeroute was only dropped onlocalhost: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..github/workflows/e2e-local.yml): an advisory job on a self-hosted runner with the labelplaceos-e2e. There is nopull_requesttrigger, because this repository is public. Do not make it a required check yet.Testing
e2e/stack/up.sh --fresh, thenbun run e2e:local: 7 passed (also withCI=true; the step summary renders).vitest(placeos.spec),tsc -p e2e/tsconfig.jsonand eslint pass. actionlint reports only the custom runner label.placeos-e2erunner must be registered for this repository first (see "CI" ine2e/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