mirror of
https://github.com/ppy/osu.git
synced 2026-06-03 06:09:54 +08:00
Merge pull request #34478 from smoogipoo/fix-intermittent-test
Fix intermittent update manager test, skin editor test not working on macOS
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates should be checked when the release stream is changed.
|
||||
/// </summary>
|
||||
|
||||
@@ -126,12 +126,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddUntilStep("wait for accuracy counter", () => Game.ChildrenOfType<ArgonAccuracyCounter>().Any(counter => counter.Position != new Vector2()));
|
||||
AddStep("dump state of accuracy meter", () => state = JsonConvert.SerializeObject(Game.ChildrenOfType<ArgonAccuracyCounter>().First().CreateSerialisedInfo()));
|
||||
AddStep("add any component", () => Game.ChildrenOfType<SkinComponentToolbox.ToolboxComponentButton>().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<Player>().Single().ChildrenOfType<ArgonAccuracyCounter>().Count(),
|
||||
() => Is.EqualTo(1));
|
||||
@@ -163,12 +158,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddUntilStep("wait for accuracy counter", () => Game.ChildrenOfType<ArgonAccuracyCounter>().Any(counter => counter.Position != new Vector2()));
|
||||
AddStep("dump state of accuracy meter", () => state = JsonConvert.SerializeObject(Game.ChildrenOfType<ArgonAccuracyCounter>().First().CreateSerialisedInfo()));
|
||||
AddStep("add any component", () => Game.ChildrenOfType<SkinComponentToolbox.ToolboxComponentButton>().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<Player>().Single().ChildrenOfType<ArgonAccuracyCounter>().Count(),
|
||||
() => Is.EqualTo(1));
|
||||
@@ -190,12 +180,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
|
||||
AddUntilStep("wait for components", () => skinEditor.ChildrenOfType<SkinBlueprint>().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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user