mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09: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)));
|
&& 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]
|
[Test]
|
||||||
public void TestCustomisationToggleState()
|
public void TestCustomisationToggleState()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user