mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Display placeholder if no statistics available
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Ranking.Statistics;
|
||||
@ -12,7 +14,7 @@ namespace osu.Game.Tests.Visual.Ranking
|
||||
public class TestSceneStatisticsPanel : OsuTestScene
|
||||
{
|
||||
[Test]
|
||||
public void TestScore()
|
||||
public void TestScoreWithStatistics()
|
||||
{
|
||||
var score = new TestScoreInfo(new OsuRuleset().RulesetInfo)
|
||||
{
|
||||
@ -22,9 +24,20 @@ namespace osu.Game.Tests.Visual.Ranking
|
||||
loadPanel(score);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestScoreWithoutStatistics()
|
||||
{
|
||||
loadPanel(new TestScoreInfo(new OsuRuleset().RulesetInfo));
|
||||
}
|
||||
|
||||
private void loadPanel(ScoreInfo score) => AddStep("load panel", () =>
|
||||
{
|
||||
Child = new StatisticsPanel(score);
|
||||
Child = new StatisticsPanel
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
State = { Value = Visibility.Visible },
|
||||
Score = { Value = score }
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user