mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 02:27:19 +08:00
Merge pull request #17197 from peppy/more-realm-test-wait-fixes
Fix potential test failures due to slow realm refresh in `TestSceneScreenNavigation`
This commit is contained in:
commit
3cd4136890
@ -133,7 +133,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
AddStep("confirm deletion", () => InputManager.Key(Key.Number1));
|
AddStep("confirm deletion", () => InputManager.Key(Key.Number1));
|
||||||
AddUntilStep("wait for dialog dismissed", () => Game.Dependencies.Get<DialogOverlay>().CurrentDialog == null);
|
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);
|
AddUntilStep("wait for score panel removal", () => scorePanel.Parent == null);
|
||||||
}
|
}
|
||||||
@ -178,7 +178,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
AddStep("confirm deletion", () => InputManager.Key(Key.Number1));
|
AddStep("confirm deletion", () => InputManager.Key(Key.Number1));
|
||||||
AddUntilStep("wait for dialog dismissed", () => Game.Dependencies.Get<DialogOverlay>().CurrentDialog == null);
|
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);
|
AddUntilStep("wait for score panel removal", () => scorePanel.Parent == null);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user