1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 12:00:22 +08:00

Add failing test scene

This commit is contained in:
Bartłomiej Dach
2025-10-03 09:20:24 +02:00
Unverified
parent aad321a0b8
commit ae4e015352
@@ -22,6 +22,7 @@ using osu.Game.Screens.Menu;
using osu.Game.Screens.Play;
using osu.Game.Screens.Ranking;
using osu.Game.Screens.Select;
using osu.Game.Screens.Select.Filter;
using osu.Game.Screens.Select.Leaderboards;
using osu.Game.Screens.SelectV2;
using osu.Game.Tests.Resources;
@@ -143,6 +144,36 @@ namespace osu.Game.Tests.Visual.SongSelectV2
void onScreenPushed(IScreen lastScreen, IScreen newScreen) => screensPushed.Add(lastScreen);
}
[Test]
public void TestHoveringLeftSideReexpandsGroupSelectionIsIn()
{
ImportBeatmapForRuleset(0);
LoadSongSelect();
SortAndGroupBy(SortMode.Difficulty, GroupMode.Difficulty);
AddStep("move mouse to carousel", () => InputManager.MoveMouseTo(Carousel));
AddUntilStep("expanded group is below 1 star",
() => (Carousel.ChildrenOfType<PanelGroupStarDifficulty>().SingleOrDefault(p => p.Expanded.Value)?.Item?.Model as StarDifficultyGroupDefinition)?.Difficulty.Stars,
() => Is.EqualTo(0));
AddStep("select next group", () =>
{
InputManager.PressKey(Key.ShiftLeft);
InputManager.Key(Key.Right);
InputManager.ReleaseKey(Key.ShiftLeft);
});
AddUntilStep("expanded group is 3 star",
() => (Carousel.ChildrenOfType<PanelGroupStarDifficulty>().SingleOrDefault(p => p.Expanded.Value)?.Item?.Model as StarDifficultyGroupDefinition)?.Difficulty.Stars,
() => Is.EqualTo(3));
AddStep("move mouse to left side container", () => InputManager.MoveMouseTo(this.ChildrenOfType<Screens.Select.SongSelect.LeftSideInteractionContainer>().Single()));
AddUntilStep("expanded group is below 1 star",
() => (Carousel.ChildrenOfType<PanelGroupStarDifficulty>().Single(p => p.Expanded.Value).Item?.Model as StarDifficultyGroupDefinition)?.Difficulty.Stars,
() => Is.EqualTo(0));
}
#region Hotkeys
[Test]