1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:32:55 +08:00

add test case

This commit is contained in:
Nitrous 2024-01-10 15:53:54 +08:00
parent 72e302dfac
commit aa83ac1896
No known key found for this signature in database
GPG Key ID: A5D82BAEC7C1D1F5

View File

@ -126,6 +126,24 @@ namespace osu.Game.Tests.Visual.Editing
AddAssert("sample playback re-enabled", () => !Editor.SamplePlaybackDisabled.Value);
}
[Test]
public void TestGameplayTestAtEndOfBeatmap()
{
AddStep("seek to last 2 seconds", () => EditorClock.Seek(importedBeatmapSet.MaxLength - 2000));
AddStep("click test gameplay button", () =>
{
var button = Editor.ChildrenOfType<TestGameplayButton>().Single();
InputManager.MoveMouseTo(button);
InputManager.Click(MouseButton.Left);
});
AddUntilStep("player pushed", () => Stack.CurrentScreen is EditorPlayer);
AddWaitStep("wait some", 5);
AddAssert("current screen is editor", () => Stack.CurrentScreen is Editor);
}
[Test]
public void TestCancelGameplayTestWithUnsavedChanges()
{