feat(kuma): implement wizard+monitor Playwright test (tests/uptime-kuma/playwright/)
Phase kuma M1 impl: resolves the 2026-05-28 DEFERRED uptime-kuma create-a-monitor item. Approach: Playwright (option b) — python-socketio not in cc-ci Nix env; Playwright handles Socket.IO transparently via the real browser. Selectors confirmed in 2.2.1 compiled bundle (data-cy setup wizard + data-testid monitor form/status badge). Test flow (test_monitor_wizard_and_probe): 1. Setup wizard: admin create via data-cy form → auto-login → /dashboard 2. Create self-probe monitor (https://{live_app}/) → wait ≤90s for "Up" badge 3. Heartbeat table row check: isFirstBeat=important, row has real datetime stamp 4. Negative: dead-port monitor (http://127.0.0.1:19999/dead) → wait ≤60s for "Down" All waits are bounded poll with page.wait_for_function/wait_for_url/wait_for_selector. Admin password: 64-char UUID hex, never printed/logged. Also: DECISIONS.md records Playwright choice; phase state files bootstrapped. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -1383,3 +1383,24 @@ declaration is evidence-backed in the recipe_meta comment + upstream registry; i
|
||||
way to exercise a PR at all for a recipe in this state. Re-enable path documented per-recipe
|
||||
(bluesky: drop EXPECTED_NA + set UPGRADE_BASE_VERSION="0.3.0+v0.4.219" once merged+published).
|
||||
Locked by tests/unit/test_upgrade_base.py.
|
||||
|
||||
## 2026-06-11 — uptime-kuma: Playwright (option b) for monitor-wizard test (phase kuma)
|
||||
|
||||
**Decision:** use Playwright (option b from plan-phase-kuma-monitor.md §1) to implement
|
||||
the `tests/uptime-kuma/playwright/test_monitor_wizard.py` test.
|
||||
|
||||
**Why not python-socketio (option a):** python-socketio is NOT installed in the cc-ci
|
||||
Nix Python environment (site-packages has playwright + pytest only; no socketio wheel).
|
||||
Adding it would require modifying `nix/cc-ci.nix` and running `nixos-rebuild switch` on
|
||||
cc-ci — extra Nix overhead when Playwright already handles Socket.IO transparently through
|
||||
the real browser. The option (a) benefit (speed, headless) is outweighed by the absence of
|
||||
the package.
|
||||
|
||||
**Why Playwright works here:** uptime-kuma 2.2.1 has stable `data-cy` attributes on the
|
||||
setup form and `data-testid` attributes on the monitor form + status badge — confirmed
|
||||
present in the compiled bundle (`dist/assets/index-D_mnxLA0.js`). These are the canonical
|
||||
Cypress/testing selectors; they do not change without an intentional test-attribute removal.
|
||||
The Playwright flow is deterministic: wizard → `/add` form → `/dashboard/:id` detail page.
|
||||
|
||||
**Runtime implication:** Playwright adds ~5–10 s overhead vs a headless socketio client,
|
||||
but stays well within the ≤90 s budget. Acceptable.
|
||||
|
||||
Reference in New Issue
Block a user