Fix test regression

This commit is contained in:
Joseph Madamba
2021-06-22 19:30:52 -07:00
parent 49000b9501
commit dc428da06c

View File

@ -55,7 +55,12 @@ namespace osu.Game.Tests.Visual.Editing
[Test] [Test]
public void TestExitWithoutSave() public void TestExitWithoutSave()
{ {
AddStep("exit without save", () => Editor.Exit()); AddStep("exit without save", () =>
{
Editor.Exit();
DialogOverlay.CurrentDialog.PerformOkAction();
});
AddUntilStep("wait for exit", () => !Editor.IsCurrentScreen()); AddUntilStep("wait for exit", () => !Editor.IsCurrentScreen());
AddAssert("new beatmap not persisted", () => beatmapManager.QueryBeatmapSet(s => s.ID == EditorBeatmap.BeatmapInfo.BeatmapSet.ID)?.DeletePending == true); AddAssert("new beatmap not persisted", () => beatmapManager.QueryBeatmapSet(s => s.ID == EditorBeatmap.BeatmapInfo.BeatmapSet.ID)?.DeletePending == true);
} }