From 38d16f620cdef1ab457ce2b82c5c9d1d91113761 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Mon, 6 Nov 2023 21:55:00 +0300 Subject: [PATCH] Alter test case to comply with new behaviour --- .../Visual/Navigation/TestSceneBeatmapEditorNavigation.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneBeatmapEditorNavigation.cs b/osu.Game.Tests/Visual/Navigation/TestSceneBeatmapEditorNavigation.cs index d9757d8584..b79b61202b 100644 --- a/osu.Game.Tests/Visual/Navigation/TestSceneBeatmapEditorNavigation.cs +++ b/osu.Game.Tests/Visual/Navigation/TestSceneBeatmapEditorNavigation.cs @@ -12,9 +12,7 @@ using osu.Framework.Testing; using osu.Game.Beatmaps; using osu.Game.Configuration; using osu.Game.Database; -using osu.Game.Graphics.UserInterface; using osu.Game.Overlays; -using osu.Game.Overlays.Dialog; using osu.Game.Rulesets.Mania; using osu.Game.Rulesets.Osu; using osu.Game.Screens.Edit; @@ -258,10 +256,10 @@ namespace osu.Game.Tests.Visual.Navigation var item = getEditor().ChildrenOfType().Single(i => i.Item.Text.Value.ToString() == "osu!catch"); item.TriggerClick(); }); - AddAssert("save dialog displayed", () => Game.ChildrenOfType().Single().CurrentDialog is PromptForSaveDialog); + AddAssert("save dialog displayed", () => Game.ChildrenOfType().Single().CurrentDialog is SaveRequiredPopupDialog); - AddStep("press forget all changes", () => Game.ChildrenOfType().Single().CurrentDialog!.PerformAction()); - AddWaitStep("wait", 5); + AddStep("press save", () => Game.ChildrenOfType().Single().CurrentDialog!.PerformOkAction()); + AddUntilStep("wait for editor", () => Game.ScreenStack.CurrentScreen is Editor editor && editor.IsLoaded); AddAssert("editor beatmap uses catch ruleset", () => getEditorBeatmap().BeatmapInfo.Ruleset.ShortName == "fruits"); }