mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-18 23:41:48 +01:00
Dashboard: replace HealthStatusBar + ActionQueue with consolidated DashboardHero, add CompositionPanel for infrastructure/workload breakdown, switch to 4-column grid layout, prevent flicker on background refetches via initialLoadComplete guard. AI Chat: migrate from legacy useAIChatResources() to unified useResources() hook with proper platformData unwrapping and vmid parsing. Storage: extend StorageFilter with richer status/group-by options and leading filters slot, add StorageHero component. Backend: mark multi_tenant as implemented in MSP tier feature map. Infra: update certification trackers GO_WITH_CONDITIONS → GO (conditions resolved), update devcontainer Go refs to 1.25.7, update validate-release.sh for embedded docker-agent binary, add integration perf measurement utility, guard CSRF fetch in test mode.
Integration Tests (Playwright)
End-to-end Playwright tests that validate critical user flows against a running Pulse instance.
Architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────────┐
│ Playwright │────▶│ Pulse Server │────▶│ Mock GitHub API │
│ (Browser UI) │ │ (Test Instance) │ │ (Controlled │
│ │ │ │ │ Responses) │
└─────────────────┘ └──────────────────┘ └─────────────────────┘
Test Scenarios
tests/00-diagnostic.spec.ts— smoke test that the stack boots and the UI renders.tests/01-core-e2e.spec.ts— critical UI flows:- Bootstrap setup wizard (fresh instance)
- Login + authenticated state
- Alerts thresholds create/delete
- Settings persistence across refresh
- Add/delete a Proxmox node (test-only)
tests/02-navigation-perf.spec.ts— route transition performance budgets for:- Infrastructure → Workloads
- Workloads → Infrastructure
Running Tests
Local Development (Docker compose stack)
cd tests/integration
./scripts/setup.sh # one-time (installs deps + builds docker images)
npm test
The docker-compose stack seeds a deterministic bootstrap token for first-run setup:
- Override via
PULSE_E2E_BOOTSTRAP_TOKEN - Default token value is defined in
tests/integration/docker-compose.test.yml
Credentials used by the E2E suite can be overridden:
PULSE_E2E_USERNAME(defaultadmin)PULSE_E2E_PASSWORD(defaultadminadminadmin)PULSE_E2E_ALLOW_NODE_MUTATION=1to enable the optional "Add Proxmox node" test (disabled by default for safety)PULSE_E2E_PERF=1to enable navigation performance budget checksPULSE_E2E_PERF_ITERATIONS(default3)PULSE_E2E_PERF_INFRA_TO_WORKLOADS_BUDGET_MS(default2200)PULSE_E2E_PERF_WORKLOADS_TO_INFRA_BUDGET_MS(default2200)
Run Against An Existing Pulse Instance
cd tests/integration
PULSE_E2E_SKIP_DOCKER=1 \
PULSE_BASE_URL='http://your-pulse-host:7655' \
PULSE_E2E_USERNAME='admin' \
PULSE_E2E_PASSWORD='adminadminadmin' \
npm test
If the instance is behind self-signed TLS:
PULSE_E2E_INSECURE_TLS=1 PULSE_E2E_SKIP_DOCKER=1 PULSE_BASE_URL='https://...' npm test
CI Pipeline
- Core E2E flows run via
.github/workflows/test-e2e.yml - Update flow coverage remains in
.github/workflows/test-updates.yml
Test Data (Update Flow Only)
The mock GitHub server (mock-github-server/) provides controllable responses:
/api/releases- List all releases/api/releases/latest- Latest stable release/download/{version}/pulse-{version}-linux-amd64.tar.gz- Release tarballs/download/{version}/checksums.txt- Checksum files
Response behavior can be controlled via environment variables:
MOCK_CHECKSUM_ERROR=true- Return invalid checksumsMOCK_NETWORK_ERROR=true- Simulate network failuresMOCK_RATE_LIMIT=true- Enable aggressive rate limitingMOCK_STALE_RELEASE=true- Mark releases as stale
Success Criteria
- ✅ Core E2E flows pass reliably in CI
- ✅ Update flow remains covered via API integration test + smoke UI check