mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:47:52 +08:00
Add failing test case
This commit is contained in:
parent
f2bc16f4bd
commit
c1a9bf507a
@ -272,7 +272,21 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
AddAssert("Overlay is closed", () => pauseOverlay.State.Value == Visibility.Hidden);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSelectionResetOnVisibilityChange()
|
||||
{
|
||||
showOverlay();
|
||||
AddStep("Select last button", () => InputManager.Key(Key.Up));
|
||||
|
||||
hideOverlay();
|
||||
showOverlay();
|
||||
|
||||
AddAssert("No button selected",
|
||||
() => pauseOverlay.Buttons.All(button => !button.Selected.Value));
|
||||
}
|
||||
|
||||
private void showOverlay() => AddStep("Show overlay", () => pauseOverlay.Show());
|
||||
private void hideOverlay() => AddStep("Hide overlay", () => pauseOverlay.Hide());
|
||||
|
||||
private DialogButton getButton(int index) => pauseOverlay.Buttons.Skip(index).First();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user