Repository navigation
Conversation
A test can now prove which scenario a fake camera is playing before it asserts on it. The four tests that need a live camera on 127.0.0.1:8443 get the integration marker.
…o.json scenario.json gains an expected block (alerts, sequences, location, timeout_s), validated offline by tests/test_scenarios.py. tests/e2e waits for the first alert, then for every fake camera to finish, and compares what the API returns with that block. Tests that need Postgres or S3 get the integration marker so the offline suite passes with no stack.
Fresh stack, in-repo images built, engine and front profiles up, then the e2e tests. The exit code is kept and the compose logs, ps and junit go to e2e-artifacts/. The three images with no arm64 manifest are pinned to linux/amd64 so the stack starts on Apple Silicon.
Writes the frames into <camera>/<preset>/ and takes the sequence seen on the pose whose patrol_id is that preset. Without --preset nothing changes.
A preset plays <scenario>/<camera>/<preset>/*.jpg when the folder exists and falls back to the camera-level frames, so the existing scenarios are unchanged. finished now waits for every preset declared in poses, and GET /scenario reports visits, frame and frames per preset. The e2e never-polled abort keys on those visits.
Preset 3 of croix-augas-01 plays 18 frames of prod alert 49767 then a clear frame, the six other poses hold one clear frame. Expected: one alert, one sequence on that pose. SCENARIOS_URL can now be overridden, so the images can be fetched from another release.
Three read-only tests in tests/e2e/ui on the smoke-one-camera alert: the alert card names the camera, the player image is loaded and is one the API serves for the sequence, the close-up is one of its crops and can be hidden and shown. One login for the session through the real login page, reused through the storage state. make e2e runs the API tests then the browser tests, and make e2e-install installs Chromium.
This was referenced Nov 12, 2026
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
#72 and #73 check the alert through the API only. Nothing opens the platform -> a broken alert card, player or image URL would still pass. #53 asks for a first browser test on the same scenario,
smoke-one-camera.What this adds
tests/e2e/ui/: pytest-playwright, Chromium on the host (the platform and the presigned image URLs point atlocalhost).en-USand timezone UTC pinned.croix-augas-01, the player image is loaded and is one the API serves for the sequence, the close-up is one of its crops and can be hidden and shown.make e2eruns the API tests then the browser tests, the first failing code wins.make e2e-installinstalls Chromium, once per machine.e2e-artifacts/playwright/.Example
Only the browser tests, on a stack that is already up:
Checks
make e2e SCENARIO=smoke-one-camera, fresh stackPOST /login/credsfrom the browser)trace.zipandtest-failed-1.pngine2e-artifacts/playwright/E2E_PLATFORM_URL=http://localhost:1 make e2e SCENARIO=smoke-one-camera(platform unreachable)makeexits 2,compose.logandps.txtstill writtenpytest tests --ignore=tests/e2e -m "not integration"tests/e2eSingle runs on an arm64 Mac, app images under amd64 emulation.
Open points
data-testid-> selectors go by role and English text (Login,Detected by :,Hide close-up). The images have noalt-> they are found by URL path againsturlandcrop_urlfrom the API. A small PR on new-pyro-platform adding test ids would make this sturdier.Closes #53.