Attempt to fix failing tests by delaying starting of the gameplay clock

This commit is contained in:
Dean Herbert
2019-05-10 18:10:07 +09:00
parent 3860282ace
commit 97796a8578
2 changed files with 17 additions and 2 deletions

View File

@ -6,6 +6,7 @@ using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Cursor;
using osu.Game.Rulesets;
@ -31,6 +32,14 @@ namespace osu.Game.Tests.Visual.Gameplay
base.Content.Add(content = new MenuCursorContainer { RelativeSizeAxes = Axes.Both });
}
[SetUpSteps]
public override void SetUpSteps()
{
base.SetUpSteps();
AddStep("resume player", () => Player.GameplayClockContainer.Start());
confirmClockRunning(true);
}
[Test]
public void TestPauseResume()
{
@ -203,6 +212,12 @@ namespace osu.Game.Tests.Visual.Gameplay
base.LoadComplete();
HUDOverlay.HoldToQuit.PauseOnFocusLost = false;
}
public override void OnEntering(IScreen last)
{
base.OnEntering(last);
GameplayClockContainer.Stop();
}
}
}
}