From 5657e7f11ec5d0e8551380efeb3e4998e6e55f3c Mon Sep 17 00:00:00 2001 From: Jai Sharma Date: Thu, 5 May 2022 14:52:03 +0100 Subject: [PATCH] Fix chat height saving/loading test --- osu.Game.Tests/Visual/Online/TestSceneChatOverlayV2.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneChatOverlayV2.cs b/osu.Game.Tests/Visual/Online/TestSceneChatOverlayV2.cs index 31ced4e8f7..98574e5d53 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneChatOverlayV2.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneChatOverlayV2.cs @@ -133,13 +133,15 @@ namespace osu.Game.Tests.Visual.Online [Test] public void TestChatHeight() { - Bindable configChatHeight = config.GetBindable(OsuSetting.ChatDisplayHeight); + Bindable configChatHeight = null; float newHeight = 0; + AddStep("Bind config chat height", () => configChatHeight = config.GetBindable(OsuSetting.ChatDisplayHeight).GetBoundCopy()); AddStep("Set config chat height", () => configChatHeight.Value = 0.4f); AddStep("Show overlay", () => chatOverlay.Show()); AddAssert("Overlay uses config height", () => chatOverlay.Height == 0.4f); - AddStep("Drag overlay to new height", () => { + AddStep("Drag overlay to new height", () => + { InputManager.MoveMouseTo(chatOverlayTopBar); InputManager.PressButton(MouseButton.Left); InputManager.MoveMouseTo(chatOverlayTopBar, new Vector2(0, -300));