Reimplement all query methods

This commit is contained in:
Dean Herbert
2021-12-13 19:01:20 +09:00
parent 53792811b2
commit 4f6a05ce3d
9 changed files with 81 additions and 41 deletions

View File

@ -44,6 +44,9 @@ namespace osu.Game.Tests.Visual.UserInterface
private BeatmapInfo beatmapInfo;
[Resolved]
private RealmContextFactory realmFactory { get; set; }
[Cached]
private readonly DialogOverlay dialogOverlay;
@ -112,8 +115,11 @@ namespace osu.Game.Tests.Visual.UserInterface
[SetUp]
public void Setup() => Schedule(() =>
{
// Due to soft deletions, we can re-use deleted scores between test runs
scoreManager.Undelete(scoreManager.QueryScores(s => s.DeletePending).ToList());
using (var realm = realmFactory.CreateContext())
{
// Due to soft deletions, we can re-use deleted scores between test runs
scoreManager.Undelete(realm.All<ScoreInfo>().Where(s => s.DeletePending).ToList());
}
leaderboard.Scores = null;
leaderboard.FinishTransforms(true); // After setting scores, we may be waiting for transforms to expire drawables