1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Replace until step with wait step with explanatory comment

This commit is contained in:
Salman Ahmed 2021-08-13 13:01:17 +03:00
parent f5cea0cacd
commit 7cf6b551d3

View File

@ -93,10 +93,15 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddAssert("all player loader settings hidden", () => this.ChildrenOfType<PlayerLoader>().All(l => !l.ChildrenOfType<FillFlowContainer<PlayerSettingsGroup>>().Any()));
AddUntilStep("wait for players to load", () => spectatorScreen.AllPlayersLoaded);
AddUntilStep("all interactive elements removed", () => this.ChildrenOfType<Player>().All(p =>
// components wrapped in skinnable target containers load asynchronously, potentially taking more than one frame to load.
// wait once to properly execute the assert.
AddWaitStep("wait for async load", 1);
AddAssert("all interactive elements removed", () => this.ChildrenOfType<Player>().All(p =>
!p.ChildrenOfType<PlayerSettingsOverlay>().Any() &&
!p.ChildrenOfType<HoldForMenuButton>().Any() &&
p.ChildrenOfType<SongProgressBar>().SingleOrDefault()?.ShowHandle == false));
!p.ChildrenOfType<SongProgressBar>().Single().ShowHandle));
}
[Test]