From b884441ba0d10bdd3559748507a0991888f66194 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Thu, 19 Nov 2026 08:53:51 +0100 Subject: Phase 6: settings, saves, localization parity (M6) --- server/test/net/multiplayer_test.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'server/test/net/multiplayer_test.dart') diff --git a/server/test/net/multiplayer_test.dart b/server/test/net/multiplayer_test.dart index e3bb225..b336501 100644 --- a/server/test/net/multiplayer_test.dart +++ b/server/test/net/multiplayer_test.dart @@ -376,13 +376,16 @@ void main() { reason: 'current', ); - // undo: the state rolls back (the index carries the undone action's - // index, exactly like the reference app's server-side send). + // undo: the state rolls back. The wire index is the post-decrement one + // (the reference reports the pre-decrement index — its clients keep + // local state; our stateless web clients take the index at face value, + // so it must equal the state position). The description is the undone + // action's, as in the reference. table.bob.send({'t': 'undo'}); for (final client in table.everyone) { final update = await client.nextOf('update'); state = stateOf(update); - expect(update['index'], indexAtTurnDone); + expect(update['index'], indexAtTurnDone - 1); expect( TestClient.characterIn(state, 'Banner Spear')?['turnState'], 1, -- cgit v1.3.1