mirror of
https://github.com/ppy/osu.git
synced 2025-02-07 21:33:16 +08:00
Add failing test coverage of random rewind button not working
This commit is contained in:
parent
0a97fb6359
commit
c8cc36e9af
@ -48,6 +48,7 @@ using osu.Game.Screens.Select.Carousel;
|
|||||||
using osu.Game.Screens.Select.Leaderboards;
|
using osu.Game.Screens.Select.Leaderboards;
|
||||||
using osu.Game.Screens.Select.Options;
|
using osu.Game.Screens.Select.Options;
|
||||||
using osu.Game.Tests.Beatmaps.IO;
|
using osu.Game.Tests.Beatmaps.IO;
|
||||||
|
using osu.Game.Tests.Resources;
|
||||||
using osu.Game.Utils;
|
using osu.Game.Utils;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
@ -202,6 +203,38 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
TextBox filterControlTextBox() => songSelect.ChildrenOfType<FilterControl.FilterControlTextBox>().Single();
|
TextBox filterControlTextBox() => songSelect.ChildrenOfType<FilterControl.FilterControlTextBox>().Single();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestSongSelectRandomRewindButton()
|
||||||
|
{
|
||||||
|
Guid? originalSelection = null;
|
||||||
|
TestPlaySongSelect songSelect = null;
|
||||||
|
|
||||||
|
PushAndConfirm(() => songSelect = new TestPlaySongSelect());
|
||||||
|
AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
|
||||||
|
|
||||||
|
AddStep("Add two beatmaps", () =>
|
||||||
|
{
|
||||||
|
Game.BeatmapManager.Import(TestResources.CreateTestBeatmapSetInfo(8));
|
||||||
|
Game.BeatmapManager.Import(TestResources.CreateTestBeatmapSetInfo(8));
|
||||||
|
});
|
||||||
|
|
||||||
|
AddUntilStep("wait for selected", () =>
|
||||||
|
{
|
||||||
|
originalSelection = Game.Beatmap.Value.BeatmapInfo.ID;
|
||||||
|
return !Game.Beatmap.IsDefault;
|
||||||
|
});
|
||||||
|
|
||||||
|
AddStep("hit random", () =>
|
||||||
|
{
|
||||||
|
InputManager.MoveMouseTo(Game.ChildrenOfType<FooterButtonRandom>().Single());
|
||||||
|
InputManager.Click(MouseButton.Left);
|
||||||
|
});
|
||||||
|
AddUntilStep("wait for selection changed", () => Game.Beatmap.Value.BeatmapInfo.ID, () => Is.Not.EqualTo(originalSelection));
|
||||||
|
|
||||||
|
AddStep("hit random rewind", () => InputManager.Click(MouseButton.Right));
|
||||||
|
AddUntilStep("wait for selection reverted", () => Game.Beatmap.Value.BeatmapInfo.ID, () => Is.EqualTo(originalSelection));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestSongSelectScrollHandling()
|
public void TestSongSelectScrollHandling()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user