1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 04:02:57 +08:00

Added a test for toggling the storyboard after the map is loaded

This commit is contained in:
Christine Chen 2021-04-17 21:49:29 -04:00
parent c77f838fb0
commit e9f8fa64b8

View File

@ -58,6 +58,16 @@ namespace osu.Game.Tests.Visual.Gameplay
AddAssert("score shown", () => Player.IsScoreShown);
}
[TestCase(false)]
[TestCase(true)]
public void TestStoryboardToggle(bool enabledAtBeginning)
{
AddStep($"{(enabledAtBeginning ? "enable" : "disable")} storyboard", () => LocalConfig.SetValue(OsuSetting.ShowStoryboard, enabledAtBeginning));
AddUntilStep("storyboard loaded", () => Player.Beatmap.Value.StoryboardLoaded);
AddStep($"toggle storyboard", () => LocalConfig.SetValue(OsuSetting.ShowStoryboard, !enabledAtBeginning));
AddUntilStep("wait for score shown", () => Player.IsScoreShown);
}
protected override bool AllowFail => false;
protected override Ruleset CreatePlayerRuleset() => new OsuRuleset();