mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 21:12:55 +08:00
Merge pull request #16588 from peppy/dont-exit-screens-test-browser
Avoid adding "exit all screens" step when running tests interactively
This commit is contained in:
commit
37b74aafcc
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Development;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
@ -72,8 +73,11 @@ namespace osu.Game.Tests.Visual
|
||||
[TearDownSteps]
|
||||
public void TearDownSteps()
|
||||
{
|
||||
AddStep("exit game", () => Game.Exit());
|
||||
AddUntilStep("wait for game exit", () => Game.Parent == null);
|
||||
if (DebugUtils.IsNUnitRunning)
|
||||
{
|
||||
AddStep("exit game", () => Game.Exit());
|
||||
AddUntilStep("wait for game exit", () => Game.Parent == null);
|
||||
}
|
||||
}
|
||||
|
||||
protected void CreateGame()
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Development;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Logging;
|
||||
@ -48,7 +49,11 @@ namespace osu.Game.Tests.Visual
|
||||
public virtual void SetUpSteps() => addExitAllScreensStep();
|
||||
|
||||
[TearDownSteps]
|
||||
public virtual void TearDownSteps() => addExitAllScreensStep();
|
||||
public virtual void TearDownSteps()
|
||||
{
|
||||
if (DebugUtils.IsNUnitRunning)
|
||||
addExitAllScreensStep();
|
||||
}
|
||||
|
||||
private void addExitAllScreensStep()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user