1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:12:57 +08:00

Fix chat height saving/loading test

This commit is contained in:
Jai Sharma 2022-05-05 14:52:03 +01:00
parent 9cb52f8879
commit 5657e7f11e

View File

@ -133,13 +133,15 @@ namespace osu.Game.Tests.Visual.Online
[Test]
public void TestChatHeight()
{
Bindable<float> configChatHeight = config.GetBindable<float>(OsuSetting.ChatDisplayHeight);
Bindable<float> configChatHeight = null;
float newHeight = 0;
AddStep("Bind config chat height", () => configChatHeight = config.GetBindable<float>(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));