mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:25:39 +08:00
Merge pull request #10265 from bdach/fix-overlay-activation-instability
Fix potential instability of overlay activation tests
This commit is contained in:
commit
b3151c12ef
@ -12,6 +12,14 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
protected new OverlayTestPlayer Player => base.Player as OverlayTestPlayer;
|
||||
|
||||
public override void SetUpSteps()
|
||||
{
|
||||
base.SetUpSteps();
|
||||
|
||||
AddUntilStep("gameplay has started",
|
||||
() => Player.GameplayClockContainer.GameplayClock.CurrentTime > Player.DrawableRuleset.GameplayStartTime);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGameplayOverlayActivation()
|
||||
{
|
||||
@ -21,7 +29,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[Test]
|
||||
public void TestGameplayOverlayActivationPaused()
|
||||
{
|
||||
AddUntilStep("activation mode is disabled", () => Player.OverlayActivationMode == OverlayActivation.Disabled);
|
||||
AddAssert("activation mode is disabled", () => Player.OverlayActivationMode == OverlayActivation.Disabled);
|
||||
AddStep("pause gameplay", () => Player.Pause());
|
||||
AddUntilStep("activation mode is user triggered", () => Player.OverlayActivationMode == OverlayActivation.UserTriggered);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user