Standalone theme harness tests omit window after the User storage seam changed #958

Open
opened 2026-10-02 22:55:06 +00:00 by kayg · 0 comments
Owner

The existing standalone theme tests in apps/web/e2e/harness.test.mjs fail because the VM fixture supplies localStorage but no window. assertRenderedTheme now reads the shared User storage seam on window. A real browser has it; the VM fixture does not.

Command: node --test apps/web/e2e/harness.test.mjs, with a built CALTERNAL_SERVER_BIN. Seven existing theme cases report ReferenceError: window is not defined. The wrong-phase rejection case passes without proving its intended phase check because the same ReferenceError rejects first. These failures were present before the #427 listener-isolation fix; no existing fixture or expectation was changed in that fix.

Update the fixture under the User storage behavior's issue, keep the existing preference/phase assertions, and prove that the rejection tests reject for the intended reason. This is a test fixture defect, not a demonstrated production theme defect. The new real-server listener-isolation regression passes alone. Logs: artifacts/round4/harness-red.log and harness-green.log in merge-round-7a.

The existing standalone theme tests in apps/web/e2e/harness.test.mjs fail because the VM fixture supplies localStorage but no window. assertRenderedTheme now reads the shared User storage seam on window. A real browser has it; the VM fixture does not. Command: node --test apps/web/e2e/harness.test.mjs, with a built CALTERNAL_SERVER_BIN. Seven existing theme cases report `ReferenceError: window is not defined`. The wrong-phase rejection case passes without proving its intended phase check because the same ReferenceError rejects first. These failures were present before the #427 listener-isolation fix; no existing fixture or expectation was changed in that fix. Update the fixture under the User storage behavior's issue, keep the existing preference/phase assertions, and prove that the rejection tests reject for the intended reason. This is a test fixture defect, not a demonstrated production theme defect. The new real-server listener-isolation regression passes alone. Logs: artifacts/round4/harness-red.log and harness-green.log in merge-round-7a.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#958
No description provided.