1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:07:52 +08:00

Add test coverage for crashing on wrong ruleset

This commit is contained in:
Bartłomiej Dach 2023-12-04 13:58:07 +01:00
parent 7c041df0f1
commit 43312619e3
No known key found for this signature in database

View File

@ -13,6 +13,7 @@ using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Framework.Threading;
using osu.Game.Online.API;
using osu.Game.Beatmaps;
using osu.Game.Overlays.Settings;
using osu.Game.Overlays.SkinEditor;
using osu.Game.Rulesets.Mods;
@ -283,6 +284,22 @@ namespace osu.Game.Tests.Visual.Navigation
switchToGameplayScene();
}
[Test]
public void TestOpenSkinEditorGameplaySceneWhenDifferentRulesetActive()
{
BeatmapSetInfo beatmapSet = null!;
AddStep("import beatmap", () => beatmapSet = BeatmapImportHelper.LoadQuickOszIntoOsu(Game).GetResultSafely());
AddStep("select mania difficulty", () =>
{
var beatmap = beatmapSet.Beatmaps.First(b => b.Ruleset.OnlineID == 3);
Game.Beatmap.Value = Game.BeatmapManager.GetWorkingBeatmap(beatmap);
});
openSkinEditor();
switchToGameplayScene();
}
private void advanceToSongSelect()
{
PushAndConfirm(() => songSelect = new TestPlaySongSelect());