fix(web-e2e): expose serialize() on classic bridge; use real clock API
Web WASM Freshness / freshness (pull_request) Failing after 7m8s
Web WASM Freshness / freshness (pull_request) Failing after 7m8s
Two latent test bugs surfaced once the e2e suite actually ran (it had been red on the webServer startup timeout, so these never executed): 14 passed, 4 failed. - game.js `__FERROUS_DEBUG__` was missing `serialize()` — play.html's bridge has it but the /play-classic bridge (which the resume/move-history tests use) drifted. Added it (the wasm SolitaireGame already exposes serialize()). - game_behaviors.spec.js called `page.clock.tick()`, which is the sinon name; Playwright's Clock API method is `page.clock.runFor()`. Replaced all 6 calls. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -986,6 +986,9 @@ window.__FERROUS_DEBUG__ = {
|
||||
snapshot() {
|
||||
return game ? game.debug_snapshot() : null;
|
||||
},
|
||||
serialize() {
|
||||
return game ? game.serialize() : null;
|
||||
},
|
||||
applyLegalMove(index) {
|
||||
if (!game) return { ok: false, error: "game_not_ready" };
|
||||
const result = game.debug_apply_legal_move(index);
|
||||
|
||||
Reference in New Issue
Block a user