1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Split test into two

They would fail on CI when written as one, and I don't care why.
This commit is contained in:
Bartłomiej Dach 2023-11-02 22:14:38 +01:00
parent 3a6d65d395
commit d25b54c06d
No known key found for this signature in database

View File

@ -837,7 +837,7 @@ namespace osu.Game.Tests.Visual.Navigation
} }
[Test] [Test]
public void TestTouchScreenDetection() public void TestTouchScreenDetectionAtSongSelect()
{ {
AddStep("touch logo", () => AddStep("touch logo", () =>
{ {
@ -859,8 +859,9 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("close settings sidebar", () => InputManager.Key(Key.Escape)); AddStep("close settings sidebar", () => InputManager.Key(Key.Escape));
Screens.Select.SongSelect songSelect = null; Screens.Select.SongSelect songSelect = null;
PushAndConfirm(() => songSelect = new TestPlaySongSelect()); AddRepeatStep("go to solo", () => InputManager.Key(Key.P), 3);
AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded); AddUntilStep("wait for song select", () => (songSelect = Game.ScreenStack.CurrentScreen as Screens.Select.SongSelect) != null);
AddUntilStep("wait for beatmap sets loaded", () => songSelect.BeatmapSetsLoaded);
AddStep("switch to osu! ruleset", () => AddStep("switch to osu! ruleset", () =>
{ {
@ -907,10 +908,15 @@ namespace osu.Game.Tests.Visual.Navigation
InputManager.Click(MouseButton.Left); InputManager.Click(MouseButton.Left);
}); });
AddUntilStep("touch device mod not activated", () => Game.SelectedMods.Value, () => Has.None.InstanceOf<ModTouchDevice>()); AddUntilStep("touch device mod not activated", () => Game.SelectedMods.Value, () => Has.None.InstanceOf<ModTouchDevice>());
}
[Test]
public void TestTouchScreenDetectionInGame()
{
PushAndConfirm(() => new TestPlaySongSelect());
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely()); AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely());
AddUntilStep("wait for selected", () => !Game.Beatmap.IsDefault); AddUntilStep("wait for selected", () => !Game.Beatmap.IsDefault);
AddStep("press enter", () => InputManager.Key(Key.Enter)); AddStep("select", () => InputManager.Key(Key.Enter));
Player player = null; Player player = null;