mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
Add test coverage for column dimming behaviour
This commit is contained in:
parent
e13d0d02ae
commit
24a1eb8003
@ -111,6 +111,35 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
&& SelectedMods.Value.Any(mod => mod.GetType() == typeof(OsuModMirror)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDimmedState()
|
||||
{
|
||||
createScreen();
|
||||
changeRuleset(0);
|
||||
|
||||
AddUntilStep("any column dimmed", () => this.ChildrenOfType<ModColumn>().Any(column => !column.Active.Value));
|
||||
|
||||
ModColumn firstDimmed = null;
|
||||
ModPanel firstPanel = null;
|
||||
|
||||
AddStep("click first panel on dimmed column", () =>
|
||||
{
|
||||
firstDimmed = this.ChildrenOfType<ModColumn>().First(column => !column.Active.Value);
|
||||
firstPanel = firstDimmed.ChildrenOfType<ModPanel>().First();
|
||||
InputManager.MoveMouseTo(firstPanel);
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
AddUntilStep("column undimmed", () => firstDimmed.Active.Value);
|
||||
AddAssert("panel not selected", () => !firstPanel.Active.Value);
|
||||
|
||||
AddStep("click panel again", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(firstPanel);
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
AddUntilStep("panel selected", () => firstPanel.Active.Value);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestCustomisationToggleState()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user