Add failing test coverage for select/deselect all enable behaviour

This commit is contained in:
Bartłomiej Dach
2022-05-25 21:49:31 +02:00
parent 6558b4a175
commit 4f8b6b52ba
2 changed files with 8 additions and 0 deletions

View File

@ -73,12 +73,15 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
createFreeModSelect();
AddAssert("select all button enabled", () => this.ChildrenOfType<ShearedButton>().ElementAt(1).Enabled.Value);
AddStep("click select all button", () =>
{
InputManager.MoveMouseTo(this.ChildrenOfType<ShearedButton>().ElementAt(1));
InputManager.Click(MouseButton.Left);
});
AddUntilStep("all mods selected", assertAllAvailableModsSelected);
AddAssert("select all button disabled", () => !this.ChildrenOfType<ShearedButton>().ElementAt(1).Enabled.Value);
AddStep("click deselect all button", () =>
{
@ -86,6 +89,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
InputManager.Click(MouseButton.Left);
});
AddUntilStep("all mods deselected", () => !freeModSelectOverlay.SelectedMods.Value.Any());
AddAssert("select all button enabled", () => this.ChildrenOfType<ShearedButton>().ElementAt(1).Enabled.Value);
}
private void createFreeModSelect()