1
0
Fork 0
polaris-task-force/tests
Z8MB1E ce534230a5 feat(npc-dialogue): walk a preview branch your own flags cannot reach
A condition in a draft could only be walked the way the author's flags really
resolve, so a conversation gated behind a flag they have not earned was
untestable in the preview: the other branch was unreachable without granting
themselves the flag for real.

A condition node now offers both exits. One is labelled "your flags" and is the
branch a player with the author's flags would take; the other is an amber
override that walks the opposite branch anyway. The same applies to a choice
whose gate fails: it stays clickable, reads as an override, and says so in its
gate note.

conditionBranches in preview.ts pairs the two targets and labels them, so the
component holds no branch logic of its own; an unwired branch is reported as
unwired rather than silently offering nothing. The footer counts overrides
against the author's flags, so an override walk is never mistaken for what a
player would see, and Back/Restart behave as before.

Verified in the running editor with a draft whose condition tests a flag that is
false for the dev account: the gate card showed "false for you, so a player
matching your flags takes the false branch" with both buttons, and taking the
true branch landed on the true card with "1 override against your flags" in the
footer. 3 pure tests cover the pairing and the unwired case; 223 npc-dialogue
tests pass.
2026-12-01 14:51:19 -05:00
..
audit test(audit): support exact route filtering in the mobile audit 2026-10-13 10:38:45 -04:00
e2e feat(intelligence): add attendance-gated feature unlocks to mission pages 2026-11-21 02:30:48 -05:00
fixtures Revert "feat(minigames): make Bomperator own-seat movement server-authoritative" 2026-10-21 20:25:38 -04:00
helpers test(vitest): isolate:false shared forks with per-pid template clones + memoized payload boot 2026-10-21 12:54:30 -04:00
int feat(npc-dialogue): walk a preview branch your own flags cannot reach 2026-12-01 14:51:19 -05:00
push-schema.ts test(int-suite): auto-accept drizzle push prompts in tests/push-schema.ts 2026-10-21 10:03:33 -04:00
seed-baseline.ts feat(test): run tests against a dedicated truncated database 2026-09-22 17:58:17 -04:00
test-db.ts test(vitest): honor KEEP_TEST_DBS=0 as force-drop escape hatch 2026-10-21 13:04:15 -04:00
vitest-global.ts test(vitest): parallel forks with per-worker database clones 2026-10-21 10:41:57 -04:00
vitest-marker.ts test(vitest): parallel forks with per-worker database clones 2026-10-21 10:41:57 -04:00
vitest-reporter.ts test(vitest): isolate:false shared forks with per-pid template clones + memoized payload boot 2026-10-21 12:54:30 -04:00
vitest-teardown.ts test(vitest): honor KEEP_TEST_DBS=0 as force-drop escape hatch 2026-10-21 13:04:15 -04:00
vitest-worker-setup.ts test(vitest): isolate:false shared forks with per-pid template clones + memoized payload boot 2026-10-21 12:54:30 -04:00