1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Merge pull request #7683 from peppy/fix-chat-test-failure

Fix chat test intermittently failing
This commit is contained in:
Dan Balasescu 2020-01-31 10:56:04 +09:00 committed by GitHub
commit d5b9df049b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,11 @@ namespace osu.Game.Tests.Visual.Online
public void TestSearchInSelector() public void TestSearchInSelector()
{ {
AddStep("search for 'test2'", () => chatOverlay.ChildrenOfType<SearchTextBox>().First().Text = "test2"); AddStep("search for 'test2'", () => chatOverlay.ChildrenOfType<SearchTextBox>().First().Text = "test2");
AddUntilStep("only channel 2 visible", () => chatOverlay.ChildrenOfType<ChannelListItem>().Single(c => c.IsPresent).Channel == channel2); AddUntilStep("only channel 2 visible", () =>
{
var listItems = chatOverlay.ChildrenOfType<ChannelListItem>().Where(c => c.IsPresent);
return listItems.Count() == 1 && listItems.Single().Channel == channel2;
});
} }
private void clickDrawable(Drawable d) private void clickDrawable(Drawable d)