mirror of
https://github.com/ppy/osu
synced 2025-02-12 08:07:17 +00:00
Resolve broken test scene
This commit is contained in:
parent
7796593b2c
commit
40f11ed15c
@ -19,7 +19,6 @@ namespace osu.Game.Tests.Visual.Editor
|
||||
}
|
||||
|
||||
private EditorBeatmap editorBeatmap;
|
||||
private TestEditor editor;
|
||||
|
||||
public override void SetUpSteps()
|
||||
{
|
||||
@ -153,9 +152,11 @@ namespace osu.Game.Tests.Visual.Editor
|
||||
AddAssert("no hitobject added", () => addedObject == null);
|
||||
}
|
||||
|
||||
private void addUndoSteps() => AddStep("undo", () => editor.Undo());
|
||||
private void addUndoSteps() => AddStep("undo", () => ((TestEditor)Editor).Undo());
|
||||
|
||||
private void addRedoSteps() => AddStep("redo", () => editor.Redo());
|
||||
private void addRedoSteps() => AddStep("redo", () => ((TestEditor)Editor).Redo());
|
||||
|
||||
protected override Screens.Edit.Editor CreateEditor() => new TestEditor();
|
||||
|
||||
private class TestEditor : Screens.Edit.Editor
|
||||
{
|
||||
|
@ -36,9 +36,11 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
base.SetUpSteps();
|
||||
|
||||
AddStep("load editor", () => LoadScreen(Editor = new Editor()));
|
||||
AddStep("load editor", () => LoadScreen(Editor = CreateEditor()));
|
||||
AddUntilStep("wait for editor to load", () => Editor.ChildrenOfType<HitObjectComposer>().FirstOrDefault()?.IsLoaded == true
|
||||
&& Editor.ChildrenOfType<TimelineArea>().FirstOrDefault()?.IsLoaded == true);
|
||||
}
|
||||
|
||||
protected virtual Editor CreateEditor() => new Editor();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user