Пример #1
0
        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());

            leaderboard.Scores = null;
            leaderboard.FinishTransforms(true); // After setting scores, we may be waiting for transforms to expire drawables

            leaderboard.Beatmap = beatmap;
            leaderboard.RefreshScores(); // Required in the case that the beatmap hasn't changed
        });
Пример #2
0
        public void SetupSteps()
        {
            AddUntilStep("ensure scores imported", () => importedScores.Count == 50);
            AddStep("undelete scores", () =>
            {
                Realm.Run(r =>
                {
                    // Due to soft deletions, we can re-use deleted scores between test runs
                    scoreManager.Undelete(r.All <ScoreInfo>().Where(s => s.DeletePending).ToList());
                });
            });
            AddStep("set up leaderboard", () =>
            {
                leaderboard.BeatmapInfo = beatmapInfo;
                leaderboard.RefetchScores(); // Required in the case that the beatmap hasn't changed
            });

            // Ensure the leaderboard items have finished showing up
            AddStep("finish transforms", () => leaderboard.FinishTransforms(true));
            AddUntilStep("wait for drawables", () => leaderboard.ChildrenOfType <LeaderboardScore>().Any());
        }
Пример #3
0
 public void SetupSteps()
 {
     // Ensure the leaderboard items have finished showing up
     AddStep("finish transforms", () => leaderboard.FinishTransforms(true));
     AddUntilStep("wait for drawables", () => leaderboard.ChildrenOfType <LeaderboardScore>().Any());
 }