Files
0xJacky ac1e491486 test: steady two tests the dependency sweep shook loose
apexcharts 7 renders legend and tooltip markers as their own svg inside the
chart canvas, so matching any descendant svg now resolves five elements and
trips strict mode. Match the chart's own root instead; the chart itself was
always fine.

The AES test corrupted one byte of a real ciphertext and expected the base64
decode to reject the result, which only happens by chance because the IV is
random: 1 failure in 30 runs on unchanged code, and it took out this branch's
CI. Feed the decrypter a body that decrypts to something base64 always
rejects. 40 runs, no failures.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-03 00:50:16 +08:00
..

Public demo end-to-end tests

This directory is an isolated Playwright package for the Cloudflare Containers public demo. It does not participate in the app/ Bun workspace or change the frontend build.

Prerequisites

  • Bun
  • Docker with Linux/amd64 emulation available
  • The repository frontend already built in app/dist, or network access so cloudflare/build-binary.sh can build it

Install the isolated dependencies and Chromium once:

cd e2e
bun install
bun run install:browser

Start the local demo target

From the repository root:

sh cloudflare/build-binary.sh
docker build --platform linux/amd64 -f demo.Dockerfile -t nginxui-demo-e2e:local \
  --build-arg TARGETOS=linux --build-arg TARGETARCH=amd64 .
docker run -d --name nginxui-e2e --platform linux/amd64 --cap-drop=ALL \
  -p 18110:8080 nginxui-demo-e2e:local
until curl --fail --silent http://127.0.0.1:18110/healthz >/dev/null; do sleep 2; done

--cap-drop=ALL is required because it reproduces the Cloudflare Containers capability set.

Run the suite

The complete suite runs with one command from the repository root:

bun run --cwd e2e test

The default target is http://127.0.0.1:18110 with admin / admin. Override it when needed:

E2E_BASE_URL=https://demo.example.test E2E_USERNAME=admin E2E_PASSWORD=admin \
  bun run --cwd e2e test

Failure traces, videos, and screenshots are retained under e2e/test-results/. The HTML report is written to e2e/playwright-report/.

Stop and remove the local target when finished:

docker rm -f nginxui-e2e