mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 00:09:55 +09:00
Add test coverage for filter handling in classic style
This commit is contained in:
@ -226,6 +226,11 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
AddStep("press J", () => InputManager.Key(Key.J));
|
||||
AddAssert("no change", () => this.ChildrenOfType<ModPanel>().Single(panel => panel.Active.Value).Mod.Acronym == "NC");
|
||||
|
||||
AddStep("filter everything but NC", () => setFilter(mod => mod.Acronym == "NC"));
|
||||
|
||||
AddStep("press A", () => InputManager.Key(Key.A));
|
||||
AddAssert("no change", () => this.ChildrenOfType<ModPanel>().Single(panel => panel.Active.Value).Mod.Acronym == "NC");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -273,6 +278,11 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
AddStep("press J", () => InputManager.Key(Key.J));
|
||||
AddAssert("no change", () => this.ChildrenOfType<ModPanel>().Count(panel => panel.Active.Value) == 2);
|
||||
|
||||
AddStep("filter everything but NC", () => setFilter(mod => mod.Acronym == "NC"));
|
||||
|
||||
AddStep("press A", () => InputManager.Key(Key.A));
|
||||
AddAssert("no change", () => this.ChildrenOfType<ModPanel>().Count(panel => panel.Active.Value) == 2);
|
||||
}
|
||||
|
||||
private void setFilter(Func<Mod, bool>? filter)
|
||||
|
Reference in New Issue
Block a user