From 9da57c66a2b29a0674c10659ba500c5758d40513 Mon Sep 17 00:00:00 2001 From: Piggey Date: Tue, 8 Nov 2022 20:03:09 +0100 Subject: [PATCH] add visual tests --- .../Visual/Gameplay/TestSceneGameplayLeaderboard.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneGameplayLeaderboard.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneGameplayLeaderboard.cs index 171ae829a9..a385060d62 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneGameplayLeaderboard.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneGameplayLeaderboard.cs @@ -42,7 +42,7 @@ namespace osu.Game.Tests.Visual.Gameplay AddStep("add many scores in one go", () => { - for (int i = 0; i < 32; i++) + for (int i = 0; i < 49; i++) createRandomScore(new APIUser { Username = $"Player {i + 1}" }); // Add player at end to force an animation down the whole list. @@ -61,6 +61,12 @@ namespace osu.Game.Tests.Visual.Gameplay AddUntilStep("wait for tracked score fully visible", () => leaderboard.ScreenSpaceDrawQuad.Intersects(leaderboard.TrackedScore!.ScreenSpaceDrawQuad)); + AddUntilStep("ensure player is #50", () => leaderboard.CheckPositionByUsername("You", 50)); + + AddStep("add one more player", () => createRandomScore(new APIUser { Username = "Player 50" })); + + AddUntilStep("ensure player is #?", () => leaderboard.CheckPositionByUsername("You", null)); + AddStep("change score to middle", () => playerScore.Value = 1000000); AddWaitStep("wait for movement", 5); AddUntilStep("wait for tracked score fully visible", () => leaderboard.ScreenSpaceDrawQuad.Intersects(leaderboard.TrackedScore!.ScreenSpaceDrawQuad));