Skip to content

Commit

Permalink
Simplify fetching of DrawableChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
jai-x committed May 9, 2022
1 parent 642e006 commit 5f3bea8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osu.Game.Tests/Visual/Online/TestSceneChatOverlayV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public void TextBoxRetainsFocus()
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
AddStep("Click listing", () => clickDrawable(chatOverlay.ChildrenOfType<ChannelListing>().Single()));
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
AddStep("Click drawable channel", () => clickDrawable(chatOverlay.ChildrenOfType<DrawableChannel>().Single()));
AddStep("Click drawable channel", () => clickDrawable(currentDrawableChannel));
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
AddStep("Click channel list", () => clickDrawable(chatOverlay.ChildrenOfType<ChannelList>().Single()));
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
Expand All @@ -382,7 +382,7 @@ public void TextBoxRetainsFocus()
chatOverlay.ChildrenOfType<LoadingLayer>().Single().State.Value;

private DrawableChannel currentDrawableChannel =>
chatOverlay.ChildrenOfType<Container<DrawableChannel>>().Single().Child;
chatOverlay.ChildrenOfType<DrawableChannel>().Single();

private ChannelListItem getChannelListItem(Channel channel) =>
chatOverlay.ChildrenOfType<ChannelListItem>().Single(item => item.Channel == channel);
Expand Down

0 comments on commit 5f3bea8

Please sign in to comment.