mirror of
https://github.com/ppy/osu
synced 2025-02-10 15:17:32 +00:00
Fix chat test intermittently failing
Was throwing exception instead of returning false due to LINQ Single() call.
This commit is contained in:
parent
8193991445
commit
40a4435792
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user