1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00

Show online stats on TestSceneStatisticsPanel

Fix test regression
This commit is contained in:
Dean Herbert 2023-06-28 19:06:48 +09:00
parent 6e9785ec58
commit b43949300b
2 changed files with 7 additions and 2 deletions

View File

@ -83,6 +83,7 @@ namespace osu.Game.Tests.Visual.Ranking
};
var score = TestResources.CreateTestScoreInfo();
score.OnlineID = 1234;
score.HitEvents = TestSceneStatisticsPanel.CreatePositionDistributedHitEvents();
stack.Push(screen = createResultsScreen(score));

View File

@ -13,6 +13,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.Solo;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Mods;
@ -23,6 +24,7 @@ using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
using osu.Game.Tests.Resources;
using osu.Game.Users;
using osuTK;
namespace osu.Game.Tests.Visual.Ranking
@ -33,6 +35,7 @@ namespace osu.Game.Tests.Visual.Ranking
public void TestScoreWithPositionStatistics()
{
var score = TestResources.CreateTestScoreInfo();
score.OnlineID = 1234;
score.HitEvents = CreatePositionDistributedHitEvents();
loadPanel(score);
@ -79,11 +82,12 @@ namespace osu.Game.Tests.Visual.Ranking
private void loadPanel(ScoreInfo score) => AddStep("load panel", () =>
{
Child = new StatisticsPanel
Child = new SoloStatisticsPanel(score)
{
RelativeSizeAxes = Axes.Both,
State = { Value = Visibility.Visible },
Score = { Value = score }
Score = { Value = score },
StatisticsUpdate = { Value = new SoloStatisticsUpdate(score, new UserStatistics(), new UserStatistics()) }
};
});