1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:52:55 +08:00

remove wait, use AddUntilStep

This commit is contained in:
cdwcgt 2023-05-03 22:56:47 +09:00
parent e394b487e0
commit 3a15783a3c
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2

View File

@ -301,7 +301,6 @@ namespace osu.Game.Tests.Visual.UserInterface
InputManager.Click(MouseButton.Left); InputManager.Click(MouseButton.Left);
}); });
AddWaitStep("wait some", 3);
AddAssert("present is not changed", () => panel.Preset.Value.Name == presetName); AddAssert("present is not changed", () => panel.Preset.Value.Name == presetName);
AddUntilStep("popover is unchanged", () => this.ChildrenOfType<OsuPopover>().FirstOrDefault() == popover); AddUntilStep("popover is unchanged", () => this.ChildrenOfType<OsuPopover>().FirstOrDefault() == popover);
AddStep("edit preset name", () => popover.ChildrenOfType<LabelledTextBox>().First().Current.Value = "something new"); AddStep("edit preset name", () => popover.ChildrenOfType<LabelledTextBox>().First().Current.Value = "something new");
@ -357,8 +356,8 @@ namespace osu.Game.Tests.Visual.UserInterface
InputManager.MoveMouseTo(popover.ChildrenOfType<ShearedButton>().ElementAt(1)); InputManager.MoveMouseTo(popover.ChildrenOfType<ShearedButton>().ElementAt(1));
InputManager.Click(MouseButton.Left); InputManager.Click(MouseButton.Left);
}); });
AddWaitStep("wait some", 3);
AddAssert("present mod not changed", () => AddUntilStep("present mod not changed", () =>
new HashSet<Mod>(this.ChildrenOfType<ModPresetPanel>().First().Preset.Value.Mods).SetEquals(previousMod)); new HashSet<Mod>(this.ChildrenOfType<ModPresetPanel>().First().Preset.Value.Mods).SetEquals(previousMod));
AddStep("select mods", () => SelectedMods.Value = mods); AddStep("select mods", () => SelectedMods.Value = mods);
@ -388,8 +387,8 @@ namespace osu.Game.Tests.Visual.UserInterface
InputManager.MoveMouseTo(popover.ChildrenOfType<ShearedButton>().ElementAt(1)); InputManager.MoveMouseTo(popover.ChildrenOfType<ShearedButton>().ElementAt(1));
InputManager.Click(MouseButton.Left); InputManager.Click(MouseButton.Left);
}); });
AddWaitStep("wait some", 3);
AddAssert("present mod is changed", () => AddUntilStep("present mod is changed", () =>
new HashSet<Mod>(this.ChildrenOfType<ModPresetPanel>().First().Preset.Value.Mods).SetEquals(mods)); new HashSet<Mod>(this.ChildrenOfType<ModPresetPanel>().First().Preset.Value.Mods).SetEquals(mods));
} }