mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
Attempt to fix flaky EditorNavigation
test
Conditionals taken from
f8830c6850/osu.Game/Tests/Visual/EditorTestScene.cs (L61-L62)
where it seemed to resolve other similar cases.
This commit is contained in:
parent
0bd230217b
commit
b5a8889fb8
@ -9,10 +9,12 @@ using osu.Framework.Extensions.ObjectExtensions;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Rulesets.Mania;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Screens.Edit;
|
||||
using osu.Game.Screens.Edit.Components.Timelines.Summary;
|
||||
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||
using osu.Game.Screens.Edit.GameplayTest;
|
||||
using osu.Game.Screens.Select;
|
||||
using osu.Game.Tests.Resources;
|
||||
@ -38,7 +40,10 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
AddStep("switch ruleset", () => Game.Ruleset.Value = new ManiaRuleset().RulesetInfo);
|
||||
|
||||
AddStep("open editor", () => ((PlaySongSelect)Game.ScreenStack.CurrentScreen).Edit(beatmapSet.Beatmaps.First(beatmap => beatmap.Ruleset.OnlineID == 0)));
|
||||
AddUntilStep("wait for editor open", () => Game.ScreenStack.CurrentScreen is Editor editor && editor.IsLoaded);
|
||||
AddUntilStep("wait for editor open", () => Game.ScreenStack.CurrentScreen is Editor editor
|
||||
&& editor.IsLoaded
|
||||
&& editor.ChildrenOfType<HitObjectComposer>().FirstOrDefault()?.IsLoaded == true
|
||||
&& editor.ChildrenOfType<TimelineArea>().FirstOrDefault()?.IsLoaded == true);
|
||||
AddStep("test gameplay", () =>
|
||||
{
|
||||
var testGameplayButton = this.ChildrenOfType<TestGameplayButton>().Single();
|
||||
|
Loading…
Reference in New Issue
Block a user