mirror of https://github.com/ppy/osu
Add test coverage for filter handling in classic style
This commit is contained in:
parent
da1814e7c3
commit
a996325e19
|
@ -226,6 +226,11 @@ public void TestClassicKeyboardExclusiveSelection()
|
|||
|
||||
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 @@ public void TestClassicKeyboardIncompatibleSelection()
|
|||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue