From dbc07bc6dc50f5da76cf529cebcfdaa60105361e Mon Sep 17 00:00:00 2001 From: "tsrk." Date: Tue, 12 Sep 2023 01:34:17 +0200 Subject: [PATCH] fix: provide `OverlayColourProvider` as a dep in tests --- .../Online/TestSceneUserProfilePreviousUsernames.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneUserProfilePreviousUsernames.cs b/osu.Game.Tests/Visual/Online/TestSceneUserProfilePreviousUsernames.cs index 921738d331..4310710624 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneUserProfilePreviousUsernames.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneUserProfilePreviousUsernames.cs @@ -5,6 +5,7 @@ using System; using NUnit.Framework; using osu.Framework.Graphics; using osu.Game.Online.API.Requests.Responses; +using osu.Game.Overlays; using osu.Game.Overlays.Profile.Header.Components; namespace osu.Game.Tests.Visual.Online @@ -13,12 +14,20 @@ namespace osu.Game.Tests.Visual.Online public partial class TestSceneUserProfilePreviousUsernames : OsuTestScene { private PreviousUsernames container = null!; + private OverlayColourProvider colourProvider = null!; [SetUp] public void SetUp() => Schedule(() => { - Child = container = new PreviousUsernames + colourProvider = new OverlayColourProvider(OverlayColourScheme.Pink); + Child = new DependencyProvidingContainer { + Child = container = new PreviousUsernames + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + }, + CachedDependencies = new (Type, object)[] { (typeof(OverlayColourProvider), colourProvider) }, Anchor = Anchor.Centre, Origin = Anchor.Centre, };