Skip to content

Commit

Permalink
Add failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Nov 20, 2024
1 parent ba21ad2 commit 9451396
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion osu.Game.Tests/Visual/Gameplay/TestScenePlayerLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays;
using osu.Game.Overlays.Notifications;
using osu.Game.Rulesets.Mods;
Expand Down Expand Up @@ -207,7 +208,25 @@ void moveMouse()
}

[Test]
public void TestBlockLoadViaFocus()
public void TestLoadNotBlockedViaArbitraryFocus()
{
AddStep("load dummy beatmap", () => resetPlayer(false));
AddUntilStep("wait for current", () => loader.IsCurrentScreen());

AddUntilStep("click settings slider", () =>
{
InputManager.MoveMouseTo(loader.ChildrenOfType<OsuSliderBar<float>>().First());
InputManager.Click(MouseButton.Left);

return InputManager.FocusedDrawable is OsuSliderBar<float>;
});

AddUntilStep("wait for load ready", () => player?.LoadState == LoadState.Ready);
AddUntilStep("loads", () => !loader.IsCurrentScreen());
}

[Test]
public void TestBlockLoadViaOverlayFocus()
{
AddStep("load dummy beatmap", () => resetPlayer(false));
AddUntilStep("wait for current", () => loader.IsCurrentScreen());
Expand Down

0 comments on commit 9451396

Please sign in to comment.