From 4ec064e1799ea2c0d892b7768f94f41dab00295d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 24 Jun 2019 11:00:00 +0900 Subject: [PATCH] Fix test timing regressions due to increased step count --- .../Visual/Components/TestSceneIdleTracker.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs index ef889e29a8..0540c1bbbb 100644 --- a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs +++ b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs @@ -5,6 +5,7 @@ using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Framework.Testing; using osu.Game.Input; using osuTK; using osuTK.Graphics; @@ -19,11 +20,17 @@ namespace osu.Game.Tests.Visual.Components private readonly IdleTrackingBox box3; private readonly IdleTrackingBox box4; + [SetUpSteps] + public void SetUpSteps() + { + AddStep("reset mouse position", () => InputManager.MoveMouseTo(Vector2.Zero)); + } + public TestSceneIdleTracker() { Children = new Drawable[] { - box1 = new IdleTrackingBox(1000) + box1 = new IdleTrackingBox(2000) { Name = "TopLeft", RelativeSizeAxes = Axes.Both, @@ -31,7 +38,7 @@ namespace osu.Game.Tests.Visual.Components Anchor = Anchor.TopLeft, Origin = Anchor.TopLeft, }, - box2 = new IdleTrackingBox(2000) + box2 = new IdleTrackingBox(4000) { Name = "TopRight", RelativeSizeAxes = Axes.Both, @@ -39,7 +46,7 @@ namespace osu.Game.Tests.Visual.Components Anchor = Anchor.TopRight, Origin = Anchor.TopRight, }, - box3 = new IdleTrackingBox(3000) + box3 = new IdleTrackingBox(6000) { Name = "BottomLeft", RelativeSizeAxes = Axes.Both, @@ -47,7 +54,7 @@ namespace osu.Game.Tests.Visual.Components Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, }, - box4 = new IdleTrackingBox(4000) + box4 = new IdleTrackingBox(8000) { Name = "BottomRight", RelativeSizeAxes = Axes.Both,