diff options
Diffstat (limited to 'src/LivingVillage.Desktop.Tests/DesktopTests.fs')
| -rw-r--r-- | src/LivingVillage.Desktop.Tests/DesktopTests.fs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop.Tests/DesktopTests.fs b/src/LivingVillage.Desktop.Tests/DesktopTests.fs index 667ab69..526d1af 100644 --- a/src/LivingVillage.Desktop.Tests/DesktopTests.fs +++ b/src/LivingVillage.Desktop.Tests/DesktopTests.fs @@ -53,6 +53,23 @@ type DesktopTests () = Assert.IsTrue(observationView.Observations |> List.exists (fun observation -> observation.Id = NpcId 0)) [<TestMethod>] + member _.DialogueAndOverlayViewsRejectWorldCommandsUntilClosed () = + let world = Sim.initialWorldN 42UL 4 |> Harness.atNpc 0 + let openedWorld, dialogueView = M5Interaction.apply Interact world M5Interaction.initial + let _, afterObserve = M5Interaction.apply Observe openedWorld dialogueView + let _, afterNeeds = M5Interaction.apply ToggleNeeds openedWorld dialogueView + let _, afterChronicle = M5Interaction.apply ShowChronicle openedWorld dialogueView + let _, needsView = M5Interaction.apply ToggleNeeds world M5Interaction.initial + let _, interactionAttempt = M5Interaction.apply Interact world needsView + let _, closedView = M5Interaction.apply ClosePanel world dialogueView + + Assert.AreEqual<M5View>(dialogueView, afterObserve) + Assert.AreEqual<M5View>(dialogueView, afterNeeds) + Assert.AreEqual<M5View>(dialogueView, afterChronicle) + Assert.AreEqual<M5Panel>(NeedsPanel, interactionAttempt.Panel) + Assert.AreEqual<M5Panel>(WorldPanel, closedView.Panel) + + [<TestMethod>] member _.HeadlessSmokeProvesTheThreeHopCausalChain () = let result = Program.M5Smoke.run () |
