mirror of https://github.com/ppy/osu
Add failing test case
This commit is contained in:
parent
f2bc16f4bd
commit
c1a9bf507a
|
@ -272,7 +272,21 @@ public void TestEnterKeySelection()
|
|||
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