mirror of
https://github.com/ppy/osu
synced 2025-01-18 20:10:49 +00:00
Add failing test case for ruleset without all mod types
This commit is contained in:
parent
d4122f17a2
commit
315c67a316
@ -18,6 +18,7 @@ using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Tests.Mods;
|
||||
using osuTK;
|
||||
using osuTK.Input;
|
||||
|
||||
@ -481,6 +482,21 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
AddUntilStep("3 columns visible", () => this.ChildrenOfType<ModColumn>().Count(col => col.IsPresent) == 3);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestColumnHidingOnRulesetChange()
|
||||
{
|
||||
createScreen();
|
||||
|
||||
changeRuleset(0);
|
||||
AddAssert("5 columns visible", () => this.ChildrenOfType<ModColumn>().Count(col => col.IsPresent) == 5);
|
||||
|
||||
AddStep("change to ruleset without all mod types", () => Ruleset.Value = TestCustomisableModRuleset.CreateTestRulesetInfo());
|
||||
AddUntilStep("1 column visible", () => this.ChildrenOfType<ModColumn>().Count(col => col.IsPresent) == 1);
|
||||
|
||||
changeRuleset(0);
|
||||
AddAssert("5 columns visible", () => this.ChildrenOfType<ModColumn>().Count(col => col.IsPresent) == 5);
|
||||
}
|
||||
|
||||
private void waitForColumnLoad() => AddUntilStep("all column content loaded",
|
||||
() => modSelectOverlay.ChildrenOfType<ModColumn>().Any() && modSelectOverlay.ChildrenOfType<ModColumn>().All(column => column.IsLoaded && column.ItemsLoaded));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user