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

Adjust variables and test length to avoid random failures

This commit is contained in:
Dean Herbert 2019-07-04 18:38:29 +09:00
parent 73bc71f8b2
commit 86e9d97b6a

View File

@ -31,7 +31,7 @@ namespace osu.Game.Tests.Visual.Gameplay
}, },
Children = new Drawable[] Children = new Drawable[]
{ {
skip = new SkipOverlay(5000) skip = new SkipOverlay(6000)
{ {
RequestSeek = _ => requestCount++ RequestSeek = _ => requestCount++
} }
@ -42,11 +42,12 @@ namespace osu.Game.Tests.Visual.Gameplay
[Test] [Test]
public void TestFadeOnIdle() public void TestFadeOnIdle()
{ {
AddStep("move mouse", () => InputManager.MoveMouseTo(Vector2.Zero)); AddUntilStep("fully visible", () => skip.Children.First().Alpha == 1);
AddUntilStep("wait for fade", () => skip.Children.First().Alpha == 0); AddUntilStep("wait for fade", () => skip.Children.First().Alpha < 1);
AddStep("move mouse", () => InputManager.MoveMouseTo(skip.ScreenSpaceDrawQuad.Centre)); AddStep("move mouse", () => InputManager.MoveMouseTo(skip.ScreenSpaceDrawQuad.Centre));
AddUntilStep("visible again", () => skip.Children.First().Alpha > 0); AddUntilStep("fully visible", () => skip.Children.First().Alpha == 1);
AddUntilStep("wait for fade", () => skip.Children.First().Alpha == 0); AddUntilStep("wait for fade", () => skip.Children.First().Alpha < 1);
} }
[Test] [Test]