mirror of
https://github.com/ppy/osu.git
synced 2024-11-08 14:37:25 +08:00
Simplify fetching DrawableChannel
in ChatOverlayV2
test
This commit is contained in:
parent
5f80e344c3
commit
c221058f0f
@ -365,7 +365,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
|
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
|
||||||
AddStep("Click listing", () => clickDrawable(chatOverlay.ChildrenOfType<ChannelListing>().Single()));
|
AddStep("Click listing", () => clickDrawable(chatOverlay.ChildrenOfType<ChannelListing>().Single()));
|
||||||
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
|
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
|
||||||
AddStep("Click drawable channel", () => clickDrawable(chatOverlay.ChildrenOfType<ChatOverlayDrawableChannel>().Single()));
|
AddStep("Click drawable channel", () => clickDrawable(currentDrawableChannel));
|
||||||
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
|
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
|
||||||
AddStep("Click channel list", () => clickDrawable(chatOverlay.ChildrenOfType<ChannelList>().Single()));
|
AddStep("Click channel list", () => clickDrawable(chatOverlay.ChildrenOfType<ChannelList>().Single()));
|
||||||
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
|
AddAssert("TextBox is focused", () => InputManager.FocusedDrawable == chatOverlayTextBox);
|
||||||
@ -381,8 +381,8 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
private Visibility loadingVisibility =>
|
private Visibility loadingVisibility =>
|
||||||
chatOverlay.ChildrenOfType<LoadingLayer>().Single().State.Value;
|
chatOverlay.ChildrenOfType<LoadingLayer>().Single().State.Value;
|
||||||
|
|
||||||
private ChatOverlayDrawableChannel currentDrawableChannel =>
|
private DrawableChannel currentDrawableChannel =>
|
||||||
chatOverlay.ChildrenOfType<Container<ChatOverlayDrawableChannel>>().Single().Child;
|
chatOverlay.ChildrenOfType<DrawableChannel>().Single();
|
||||||
|
|
||||||
private ChannelListItem getChannelListItem(Channel channel) =>
|
private ChannelListItem getChannelListItem(Channel channel) =>
|
||||||
chatOverlay.ChildrenOfType<ChannelListItem>().Single(item => item.Channel == channel);
|
chatOverlay.ChildrenOfType<ChannelListItem>().Single(item => item.Channel == channel);
|
||||||
|
Loading…
Reference in New Issue
Block a user