mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 05:53:10 +08:00
Show online stats on TestSceneStatisticsPanel
Fix test regression
This commit is contained in:
parent
b7ab46d87b
commit
aebbffacf2
@ -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));
|
||||
|
@ -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()) }
|
||||
};
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user