test: Vitest + pytest coverage for Setup Wizard + TemplatePicker (PR-12 sweep)
Consolidated from: #408 + #429 + #432
Scope
Cover all 23APR dashboard setup-wizard changes in one coordinated PR:
Files
- New:
dream-server/extensions/services/dashboard/src/components/__tests__/SetupWizard.test.jsx
- New:
dream-server/extensions/services/dashboard/src/components/__tests__/TemplatePicker.a11y.test.jsx
- New:
dream-server/extensions/services/dashboard-api/tests/test_setup_sentinel.py
Rationale for merge
All three issues cover the same two components (SetupWizard.jsx, TemplatePicker.jsx) plus the backend endpoint they rely on (routers/setup.py), all introduced by PR-12 and its fixups. The Vitest tests share the same mock-stream infrastructure (ReadableStream + Response(body)); duplicating that across three PRs is wasted reviewer time.
Pytest sentinel test is kept in the same PR so CI verifies frontend and backend agree on the sentinel contract simultaneously — if the Python emitter format drifts, both the pytest test and the Vitest parser test catch it.
Discovery context
Filed during 23APR audit/fix cycle. PR-12 introduced sentinel-based success detection; round-1 fixup added AbortController + Promise.allSettled; round-2 fixup combined trailer+sentinel yield to work around Starlette final-chunk drop. Live sentinel delivery verified during end-to-end test (__DREAM_RESULT__:FAIL:1\n, 745 bytes).
Closes #408, #429, #432. Labels: test, dashboard, accessibility
test: Vitest + pytest coverage for Setup Wizard + TemplatePicker (PR-12 sweep)
Consolidated from: #408 + #429 + #432
Scope
Cover all 23APR dashboard setup-wizard changes in one coordinated PR:
__DREAM_RESULT__:PASS|FAIL:<rc>, fallback scan for"All tests passed!", default-failure when both absent) (test: coverage for Setup Wizard diagnostic sentinel parser and TemplatePicker applied branch #408)runDiagnosticsAbortController lifecycle + mocked ReadableStream chunked delivery + unmount-while-running cleanup (test: Vitest for SetupWizard.runDiagnostics — mocked stream + AbortController lifecycle #429)isAppliedrender branch +aria-hidden="true"on decorative Lucide icons (Check/AlertTriangle/Loader2) + accessible name on applied card (test: coverage for Setup Wizard diagnostic sentinel parser and TemplatePicker applied branch #408 + test: Vitest + axe-core a11y assertion on TemplatePicker decorative icons #432)/api/setup/testendpoint emits the sentinel (__DREAM_RESULT__:PASS:0or__DREAM_RESULT__:FAIL:<rc>) at end of stream on bothrun_tests()anderror_stream()paths (test: coverage for Setup Wizard diagnostic sentinel parser and TemplatePicker applied branch #408)Files
dream-server/extensions/services/dashboard/src/components/__tests__/SetupWizard.test.jsxdream-server/extensions/services/dashboard/src/components/__tests__/TemplatePicker.a11y.test.jsxdream-server/extensions/services/dashboard-api/tests/test_setup_sentinel.pyRationale for merge
All three issues cover the same two components (
SetupWizard.jsx,TemplatePicker.jsx) plus the backend endpoint they rely on (routers/setup.py), all introduced by PR-12 and its fixups. The Vitest tests share the same mock-stream infrastructure (ReadableStream + Response(body)); duplicating that across three PRs is wasted reviewer time.Pytest sentinel test is kept in the same PR so CI verifies frontend and backend agree on the sentinel contract simultaneously — if the Python emitter format drifts, both the pytest test and the Vitest parser test catch it.
Discovery context
Filed during 23APR audit/fix cycle. PR-12 introduced sentinel-based success detection; round-1 fixup added AbortController + Promise.allSettled; round-2 fixup combined trailer+sentinel yield to work around Starlette final-chunk drop. Live sentinel delivery verified during end-to-end test (
__DREAM_RESULT__:FAIL:1\n, 745 bytes).Closes #408, #429, #432. Labels: test, dashboard, accessibility