mirror of
https://github.com/ppy/osu
synced 2025-03-11 05:49:12 +00:00
fix failing tests
1) waiting for loading to finish so Drawables are all present to do asserts on 2) fix NullRef in ResultPage because of removed line in DummyWorkingBeatmap (author one)
This commit is contained in:
parent
ed827d5424
commit
6a8fd74e05
@ -20,6 +20,7 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public class TestCaseBeatmapInfoWedge : OsuTestCase
|
||||
{
|
||||
private RulesetStore rulesets;
|
||||
private TestBeatmapInfoWedge infoWedge;
|
||||
private readonly List<Beatmap> beatmaps = new List<Beatmap>();
|
||||
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||
@ -27,7 +28,14 @@ namespace osu.Game.Tests.Visual
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuGameBase game, RulesetStore rulesets)
|
||||
{
|
||||
this.rulesets = rulesets;
|
||||
|
||||
beatmap.BindTo(game.Beatmap);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Add(infoWedge = new TestBeatmapInfoWedge
|
||||
{
|
||||
|
@ -324,7 +324,14 @@ namespace osu.Game.Screens.Ranking
|
||||
title.Colour = artist.Colour = colours.BlueDarker;
|
||||
versionMapper.Colour = colours.Gray8;
|
||||
|
||||
versionMapper.Text = $"{beatmap.Version} - mapped by {beatmap.Metadata.Author.Username}";
|
||||
var creator = beatmap.Metadata.Author?.Username;
|
||||
if (!string.IsNullOrEmpty(creator)) {
|
||||
versionMapper.Text = $"mapped by {creator}";
|
||||
|
||||
if (!string.IsNullOrEmpty(beatmap.Version))
|
||||
versionMapper.Text = $"{beatmap.Version} - " + versionMapper.Text;
|
||||
}
|
||||
|
||||
title.Current = localisation.GetUnicodePreference(beatmap.Metadata.TitleUnicode, beatmap.Metadata.Title);
|
||||
artist.Current = localisation.GetUnicodePreference(beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user