Fix potential test failures due to slow realm refresh in `TestSceneScreenNavigation`

As seen at https://github.com/ppy/osu/runs/5492345983?check_suite_focus=true.
This commit is contained in:
Dean Herbert 2022-03-10 18:08:07 +09:00
parent f82687a2c6
commit d5eca16b69
1 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ public void TestDeleteAllScoresAfterPlaying()
AddStep("confirm deletion", () => InputManager.Key(Key.Number1));
AddUntilStep("wait for dialog dismissed", () => Game.Dependencies.Get<DialogOverlay>().CurrentDialog == null);
AddAssert("ensure score is pending deletion", () => Game.Realm.Run(r => r.Find<ScoreInfo>(score.ID)?.DeletePending == true));
AddUntilStep("ensure score is pending deletion", () => Game.Realm.Run(r => r.Find<ScoreInfo>(score.ID)?.DeletePending == true));
AddUntilStep("wait for score panel removal", () => scorePanel.Parent == null);
}
@ -178,7 +178,7 @@ public void TestDeleteScoreAfterPlaying()
AddStep("confirm deletion", () => InputManager.Key(Key.Number1));
AddUntilStep("wait for dialog dismissed", () => Game.Dependencies.Get<DialogOverlay>().CurrentDialog == null);
AddAssert("ensure score is pending deletion", () => Game.Realm.Run(r => r.Find<ScoreInfo>(score.ID)?.DeletePending == true));
AddUntilStep("ensure score is pending deletion", () => Game.Realm.Run(r => r.Find<ScoreInfo>(score.ID)?.DeletePending == true));
AddUntilStep("wait for score panel removal", () => scorePanel.Parent == null);
}