mirror of
https://github.com/ppy/osu
synced 2024-12-11 01:19:26 +00:00
Merge pull request #16609 from peppy/fix-realm-related-failures
Fix some realm-related test failures
This commit is contained in:
commit
701f00a4b1
@ -50,10 +50,20 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddStep("close settings", () => Game.Settings.Hide());
|
||||
|
||||
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely());
|
||||
|
||||
PushAndConfirm(() => new PlaySongSelect());
|
||||
|
||||
AddUntilStep("wait for selection", () => !Game.Beatmap.IsDefault);
|
||||
|
||||
AddStep("enter gameplay", () => InputManager.Key(Key.Enter));
|
||||
|
||||
AddUntilStep("wait for player", () =>
|
||||
{
|
||||
// dismiss any notifications that may appear (ie. muted notification).
|
||||
clickMouseInCentre();
|
||||
return player != null;
|
||||
});
|
||||
|
||||
AddUntilStep("wait for gameplay", () => player?.IsBreakTime.Value == false);
|
||||
|
||||
AddStep("press 'z'", () => InputManager.Key(Key.Z));
|
||||
@ -63,6 +73,12 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddAssert("key counter did increase", () => keyCounter.CountPresses == 1);
|
||||
}
|
||||
|
||||
private void clickMouseInCentre()
|
||||
{
|
||||
InputManager.MoveMouseTo(Game.ScreenSpaceDrawQuad.Centre);
|
||||
InputManager.Click(MouseButton.Left);
|
||||
}
|
||||
|
||||
private KeyBindingsSubsection osuBindingSubsection => keyBindingPanel
|
||||
.ChildrenOfType<VariantBindingsSubsection>()
|
||||
.FirstOrDefault(s => s.Ruleset.ShortName == "osu");
|
||||
|
@ -64,13 +64,13 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
{
|
||||
base.SetUpSteps();
|
||||
|
||||
AddStep("delete all beatmaps", () =>
|
||||
AddStep("reset defaults", () =>
|
||||
{
|
||||
Ruleset.Value = new OsuRuleset().RulesetInfo;
|
||||
manager?.Delete(manager.GetAllUsableBeatmapSets());
|
||||
|
||||
Beatmap.SetDefault();
|
||||
});
|
||||
|
||||
AddStep("delete all beatmaps", () => manager?.Delete());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
Loading…
Reference in New Issue
Block a user