diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-22 00:26:05 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-22 00:26:05 +0800 |
| commit | 81a84f9f86d59387a349caa339148c7a7a6d1e72 (patch) | |
| tree | caa7f9209f5337f23e5961920e3b06a69368930a /src/LivingVillage.Desktop.Tests | |
| parent | f9e77256f9b8d3bd35a0cbe732af49d283930a5d (diff) | |
| download | living-village-81a84f9f86d59387a349caa339148c7a7a6d1e72.tar.gz | |
feat(desktop): P16-FIX 开始界面截图模式(LV_AUTOPLAY_MENU_SHOT)+ 真实菜单证据补拍
Diffstat (limited to 'src/LivingVillage.Desktop.Tests')
| -rw-r--r-- | src/LivingVillage.Desktop.Tests/P16UiTests.fs | 24 |
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)) |
