diff --git a/SVSim.UnitTests/BattleNode/Integration/BattleNodeFlowTests.cs b/SVSim.UnitTests/BattleNode/Integration/BattleNodeFlowTests.cs index 5192f9c..a582000 100644 --- a/SVSim.UnitTests/BattleNode/Integration/BattleNodeFlowTests.cs +++ b/SVSim.UnitTests/BattleNode/Integration/BattleNodeFlowTests.cs @@ -16,11 +16,12 @@ namespace SVSim.UnitTests.BattleNode.Integration; public class BattleNodeFlowTests { /// - /// End-to-end smoke for the v1.1 scripted lifecycle. Boots the EmulatedEntrypoint via + /// End-to-end smoke for the v1.2 scripted lifecycle. Boots the EmulatedEntrypoint via /// SVSimTestFactory, mints a battle through IMatchingBridge with a fixture MatchContext, /// opens a raw Socket.IO v2 client against the in-process TestServer, and drives /// InitNetwork → Loaded → Swap → TurnEnd × 2, asserting the right scripted frames come - /// back in order including the two-cycle opponent-turn loop. + /// back in order including the two-cycle three-frame opponent-turn loop (TurnStart + + /// TurnEnd + Judge per cycle). /// [Test] [Timeout(30000)] @@ -57,16 +58,18 @@ public class BattleNodeFlowTests Assert.That((await client.ReceiveSynchronizeAsync(ct)).Uri, Is.EqualTo(NetworkBattleUri.Swap)); Assert.That((await client.ReceiveSynchronizeAsync(ct)).Uri, Is.EqualTo(NetworkBattleUri.Ready)); - // --- v1.1 opponent turn loop: drive two consecutive cycles --- - // Cycle 1: player ends turn -> server pushes opponent TurnStart + TurnEnd. + // --- v1.2 opponent turn loop: drive two consecutive cycles --- + // Cycle 1: player ends turn -> server pushes opponent TurnStart + TurnEnd + Judge. await client.SendMsgAsync(MakeEnvelope(NetworkBattleUri.TurnEnd, pubSeq: 5), key, ct); Assert.That((await client.ReceiveSynchronizeAsync(ct)).Uri, Is.EqualTo(NetworkBattleUri.TurnStart)); Assert.That((await client.ReceiveSynchronizeAsync(ct)).Uri, Is.EqualTo(NetworkBattleUri.TurnEnd)); + Assert.That((await client.ReceiveSynchronizeAsync(ct)).Uri, Is.EqualTo(NetworkBattleUri.Judge)); // Cycle 2: same burst again -- session phase reset to AfterReady, so the next TurnEnd matches. await client.SendMsgAsync(MakeEnvelope(NetworkBattleUri.TurnEnd, pubSeq: 6), key, ct); Assert.That((await client.ReceiveSynchronizeAsync(ct)).Uri, Is.EqualTo(NetworkBattleUri.TurnStart)); Assert.That((await client.ReceiveSynchronizeAsync(ct)).Uri, Is.EqualTo(NetworkBattleUri.TurnEnd)); + Assert.That((await client.ReceiveSynchronizeAsync(ct)).Uri, Is.EqualTo(NetworkBattleUri.Judge)); } private static MsgEnvelope MakeEnvelope(NetworkBattleUri uri, long pubSeq, Dictionary? body = null) =>