1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 05:39:53 +08:00

Fix multiple failing song select tests

This commit is contained in:
Dean Herbert
2025-09-10 01:31:15 +09:00
Unverified
parent 2bd734918a
commit 0cd3894fa6
@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Extensions;
using osu.Framework.Graphics.Containers;
using osu.Framework.Screens;
using osu.Framework.Testing;
@@ -310,7 +311,8 @@ namespace osu.Game.Tests.Visual.SongSelectV2
[Test]
public void TestFilteringRunsAfterReturningFromGameplay()
{
AddStep("import actual beatmap", () => Beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()));
AddStep("import actual beatmap", () => Beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely());
LoadSongSelect();
AddUntilStep("wait for filtered", () => SongSelect.ChildrenOfType<BeatmapCarousel>().Single().FilterCount, () => Is.EqualTo(1));
@@ -590,7 +592,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
LoadSongSelect();
ImportBeatmapForRuleset(0);
AddAssert("options enabled", () => this.ChildrenOfType<FooterButtonOptions>().Single().Enabled.Value);
AddUntilStep("options enabled", () => this.ChildrenOfType<FooterButtonOptions>().Single().Enabled.Value);
AddStep("click", () => this.ChildrenOfType<FooterButtonOptions>().Single().TriggerClick());
AddUntilStep("popover displayed", () => this.ChildrenOfType<FooterButtonOptions.Popover>().Any(p => p.IsPresent));
@@ -647,7 +649,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
ImportBeatmapForRuleset(0);
AddAssert("options enabled", () => this.ChildrenOfType<FooterButtonOptions>().Single().Enabled.Value);
AddUntilStep("options enabled", () => this.ChildrenOfType<FooterButtonOptions>().Single().Enabled.Value);
AddStep("delete all beatmaps", () => Beatmaps.Delete());
AddAssert("beatmap selected", () => !Beatmap.IsDefault);