summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop.Tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/LivingVillage.Desktop.Tests')
-rw-r--r--src/LivingVillage.Desktop.Tests/P16UiTests.fs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop.Tests/P16UiTests.fs b/src/LivingVillage.Desktop.Tests/P16UiTests.fs
index 0db4506..b071dfa 100644
--- a/src/LivingVillage.Desktop.Tests/P16UiTests.fs
+++ b/src/LivingVillage.Desktop.Tests/P16UiTests.fs
@@ -123,3 +123,27 @@ type P16HudTests () =
Assert.IsTrue(ChineseText.requiredUiLabels |> List.contains "时段")
Assert.IsTrue(ChineseText.requiredUiLabels |> List.contains "体力")
Assert.IsTrue(ChineseText.requiredUiLabels |> List.contains "钱币")
+
+// ---- P16-FIX 菜单截图帧表 ----
+
+[<TestClass>]
+type P16MenuShotTests () =
+
+ [<TestMethod>]
+ member _.MenuShotFrameTableIsOrderedAndNamesAreDistinct () =
+ Assert.IsTrue(MenuShotScript.splashMidFrame > 0L)
+ Assert.IsTrue(LaunchScreen.revealProgress MenuShotScript.splashMidFrame > 0.0f)
+ Assert.IsTrue(LaunchScreen.revealProgress MenuShotScript.splashMidFrame < 1.0f)
+ Assert.IsTrue(MenuShotScript.splashMidFrame < MenuShotScript.initialFrame)
+ Assert.IsTrue(MenuShotScript.initialFrame < MenuShotScript.downFrame)
+ Assert.IsTrue(MenuShotScript.downFrame < MenuShotScript.loadFrame)
+ Assert.IsTrue(MenuShotScript.loadFrame < MenuShotScript.exitFrame)
+ Assert.IsTrue(MenuShotScript.initialFrame >= 120L, "initial shot must wait for the 2s entrance to settle")
+ let names = [ MenuShotScript.splashMidName; MenuShotScript.initialName; MenuShotScript.loadName ]
+ Assert.AreEqual<int>(names.Length, names |> List.distinct |> List.length)
+
+ [<TestMethod>]
+ member _.MenuShotSelectsStartThenLoadOnFreshState () =
+ let state = MenuState.create SimulationControl.initial false
+ Assert.AreEqual<MenuItem>(NewGameItem, MenuState.selectedItem state)
+ Assert.AreEqual<MenuItem>(LoadItem, MenuState.selectedItem (MenuState.move Down state))