Refactor `GameplayChatDisplay` test scene to not require `MultiplayerTestScene` inheritance

This commit is contained in:
Dean Herbert 2022-04-12 22:56:48 +09:00
parent e901857610
commit 1ebbef88ec
1 changed files with 4 additions and 5 deletions

View File

@ -9,13 +9,14 @@
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Game.Online.Rooms;
using osu.Game.Screens.OnlinePlay.Multiplayer; using osu.Game.Screens.OnlinePlay.Multiplayer;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
using osuTK.Input; using osuTK.Input;
namespace osu.Game.Tests.Visual.Multiplayer namespace osu.Game.Tests.Visual.Multiplayer
{ {
public class TestSceneGameplayChatDisplay : MultiplayerTestScene public class TestSceneGameplayChatDisplay : OsuManualInputManagerTestScene
{ {
private GameplayChatDisplay chatDisplay; private GameplayChatDisplay chatDisplay;
@ -35,11 +36,9 @@ public TestSceneGameplayChatDisplay()
} }
[SetUpSteps] [SetUpSteps]
public override void SetUpSteps() public void SetUpSteps()
{ {
base.SetUpSteps(); AddStep("load chat display", () => Child = chatDisplay = new GameplayChatDisplay(new Room())
AddStep("load chat display", () => Child = chatDisplay = new GameplayChatDisplay(SelectedRoom.Value)
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,