Skip to content

Commit

Permalink
Fix user profile overlay test scene being broke
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzibyte committed Jul 30, 2024
1 parent 33fc6df commit 7c3d592
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Testing;
using osu.Game.Online.API;
Expand All @@ -24,7 +25,17 @@ public partial class TestSceneUserProfileOverlay : OsuTestScene
[SetUpSteps]
public void SetUp()
{
AddStep("create profile overlay", () => Child = profile = new UserProfileOverlay());
AddStep("create profile overlay", () =>
{
profile = new UserProfileOverlay();
Child = new DependencyProvidingContainer
{
RelativeSizeAxes = Axes.Both,
CachedDependencies = new (Type, object)[] { (typeof(UserProfileOverlay), profile) },
Child = profile,
};
});
}

[Test]
Expand Down Expand Up @@ -131,6 +142,7 @@ public void TestCustomColourScheme()
CountryCode = CountryCode.JP,
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c2.jpg",
ProfileHue = hue,
PlayMode = "osu",
});
return true;
}
Expand Down Expand Up @@ -174,6 +186,7 @@ public void TestCustomColourSchemeWithReload()
CountryCode = CountryCode.JP,
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c2.jpg",
ProfileHue = hue,
PlayMode = "osu",
}));

int hue2 = 0;
Expand All @@ -189,6 +202,7 @@ public void TestCustomColourSchemeWithReload()
CountryCode = CountryCode.JP,
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c2.jpg",
ProfileHue = hue2,
PlayMode = "osu",
}));
}

Expand Down

0 comments on commit 7c3d592

Please sign in to comment.