houserules/packages/chess
Joey Yakimowich-Payne cd7baeae0d
test(e2e): rule-variant vertical slice
Phase F.4 of the rule-variants epic.

Three end-to-end scenarios covering the full lobby -> game flow:

  1. knightmate: selecting the knightmate layout surfaces a
     'Suggested rules' chip for knightmate-rules in LayoutPicker;
     tapping activates the preset; Play Solo loads the game with
     no console errors; a pawn push resolves normally.

  2. double-move: in-game rules drawer shows a 'Multi-move'
     category section (Phase F.3 grouping); toggling double-move
     ON makes white play two consecutive half-moves before the
     turn flips to black, verified by successful drags of two
     white pieces followed by a black piece drag.

  3. suicide-chess: after establishing a capture opportunity
     (1. e4 d5), toggling suicide-chess on via the in-game rules
     drawer. White's next move: a non-capture (a2-a3) is
     rejected by filterLegalMoves; the compulsory capture
     (e4xd5) succeeds.

Scenarios 2 and 3 toggle the preset via the IN-GAME drawer
(lives in GameView.tsx) rather than the lobby — Lobby.tsx has
no rules drawer; only the layout-picker chip path is available
pre-game. Scenario 1 exercises the chip path. Deferred:
lobby-side drawer is a follow-up if richer pre-game preset
activation UX is desired.

Tests: 1651 unit + 3 new e2e = 4-test file added to e2e suite.
All 3 pass.
2026-04-21 09:49:55 -06:00
..
docs docs(preset-api): rule variants gallery + RULES.md cross-refs 2026-04-21 09:23:10 -06:00
e2e test(e2e): rule-variant vertical slice 2026-04-21 09:49:55 -06:00
src feat(ui): group RulesDrawer presets by category + layout suggested-rules chips 2026-04-21 09:19:38 -06:00
tests/fide-games test(chess): replay 5 classic FIDE games; Phase 2 acceptance gate (P2.23) 2026-04-16 15:18:57 -06:00
index.html feat(branding): rename product to Houserules 2026-04-17 15:27:48 -06:00
package.json feat(engine): modifier profile types 2026-04-18 22:05:58 -06:00
README.md chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
RULES.md docs(preset-api): rule variants gallery + RULES.md cross-refs 2026-04-21 09:23:10 -06:00
tsconfig.json test(chess): e2e full-flow scenario; tag Phase 3 (P3.15) 2026-04-16 16:55:28 -06:00
vite.config.ts feat(chess): scaffold Vite + React app (P3.9) 2026-04-16 15:54:32 -06:00
vitest.config.ts chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00

@paratype/chess — custom-rules chess demo