From 02fefff5e7b09d070ed4e2616ea449f7b1fde39f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 5 Sep 2023 16:44:22 +0900 Subject: [PATCH] Add better testing of options popover --- .../SongSelect/TestSceneSongSelectFooterV2.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooterV2.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooterV2.cs index ed2ae67ae5..013bad55bc 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooterV2.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFooterV2.cs @@ -10,6 +10,7 @@ using osu.Framework.Graphics.Cursor; using osu.Framework.Testing; using osu.Game.Overlays; using osu.Game.Overlays.Mods; +using osu.Game.Rulesets.Osu; using osu.Game.Screens.Select.FooterV2; using osuTK.Input; @@ -57,6 +58,24 @@ namespace osu.Game.Tests.Visual.SongSelect overlay.Hide(); }); + [SetUpSteps] + public void SetUpSteps() + { + AddStep("set beatmap", () => Beatmap.Value = CreateWorkingBeatmap(CreateBeatmap(new OsuRuleset().RulesetInfo))); + } + + [Test] + public void TestShowOptions() + { + AddStep("enable options", () => + { + var optionsButton = this.ChildrenOfType().Last(); + + optionsButton.Enabled.Value = true; + optionsButton.TriggerClick(); + }); + } + [Test] public void TestState() {