diff --git a/osu.Game.Tests/NonVisual/TestSceneUpdateManager.cs b/osu.Game.Tests/NonVisual/TestSceneUpdateManager.cs index 8a9ee4b81b..e20fb50722 100644 --- a/osu.Game.Tests/NonVisual/TestSceneUpdateManager.cs +++ b/osu.Game.Tests/NonVisual/TestSceneUpdateManager.cs @@ -48,6 +48,13 @@ namespace osu.Game.Tests.NonVisual AddUntilStep("no check pending", () => !manager.IsPending); } + [TearDownSteps] + public void TeardownSteps() + { + // Importantly, this immediately saves the config, which cancels any pending background save. + AddStep("dispose config manager", () => config.Dispose()); + } + /// /// Updates should be checked when the release stream is changed. /// diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneSkinEditorNavigation.cs b/osu.Game.Tests/Visual/Navigation/TestSceneSkinEditorNavigation.cs index fe76b74bcb..02b2db6e31 100644 --- a/osu.Game.Tests/Visual/Navigation/TestSceneSkinEditorNavigation.cs +++ b/osu.Game.Tests/Visual/Navigation/TestSceneSkinEditorNavigation.cs @@ -126,12 +126,7 @@ namespace osu.Game.Tests.Visual.Navigation AddUntilStep("wait for accuracy counter", () => Game.ChildrenOfType().Any(counter => counter.Position != new Vector2())); AddStep("dump state of accuracy meter", () => state = JsonConvert.SerializeObject(Game.ChildrenOfType().First().CreateSerialisedInfo())); AddStep("add any component", () => Game.ChildrenOfType().First().TriggerClick()); - AddStep("undo", () => - { - InputManager.PressKey(Key.ControlLeft); - InputManager.Key(Key.Z); - InputManager.ReleaseKey(Key.ControlLeft); - }); + AddStep("undo", () => InputManager.Keys(PlatformAction.Undo)); AddUntilStep("only one accuracy meter left", () => Game.ChildrenOfType().Single().ChildrenOfType().Count(), () => Is.EqualTo(1)); @@ -163,12 +158,7 @@ namespace osu.Game.Tests.Visual.Navigation AddUntilStep("wait for accuracy counter", () => Game.ChildrenOfType().Any(counter => counter.Position != new Vector2())); AddStep("dump state of accuracy meter", () => state = JsonConvert.SerializeObject(Game.ChildrenOfType().First().CreateSerialisedInfo())); AddStep("add any component", () => Game.ChildrenOfType().First().TriggerClick()); - AddStep("undo", () => - { - InputManager.PressKey(Key.ControlLeft); - InputManager.Key(Key.Z); - InputManager.ReleaseKey(Key.ControlLeft); - }); + AddStep("undo", () => InputManager.Keys(PlatformAction.Undo)); AddUntilStep("only one accuracy meter left", () => Game.ChildrenOfType().Single().ChildrenOfType().Count(), () => Is.EqualTo(1)); @@ -190,12 +180,7 @@ namespace osu.Game.Tests.Visual.Navigation AddUntilStep("wait for components", () => skinEditor.ChildrenOfType().Any()); - AddStep("select all components", () => - { - InputManager.PressKey(Key.ControlLeft); - InputManager.Key(Key.A); - InputManager.ReleaseKey(Key.ControlLeft); - }); + AddStep("select all components", () => InputManager.Keys(PlatformAction.SelectAll)); AddUntilStep("components selected", () => skinEditor.SelectedComponents.Count > 0);