mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:03:21 +08:00
Check mutations at each point in the process (and also check artist/title)
This commit is contained in:
parent
e0babe4b79
commit
2e0a2a28ab
@ -30,10 +30,15 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
|
||||
PushAndConfirm(() => new EditorLoader());
|
||||
|
||||
AddUntilStep("wait for editor load", () => editor != null);
|
||||
AddUntilStep("wait for editor load", () => editor?.IsLoaded == true);
|
||||
|
||||
AddStep("Set overall difficulty", () => editorBeatmap.Difficulty.OverallDifficulty = 7);
|
||||
AddStep("Set difficulty name", () => editorBeatmap.BeatmapInfo.Version = "diffname");
|
||||
AddStep("Set artist and title", () =>
|
||||
{
|
||||
editorBeatmap.BeatmapInfo.Metadata.Artist = "artist";
|
||||
editorBeatmap.BeatmapInfo.Metadata.Title = "title";
|
||||
});
|
||||
AddStep("Set difficulty name", () => editorBeatmap.BeatmapInfo.Version = "difficulty");
|
||||
|
||||
AddStep("Add timing point", () => editorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint()));
|
||||
|
||||
@ -44,10 +49,12 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
AddStep("Move to playfield", () => InputManager.MoveMouseTo(Game.ScreenSpaceDrawQuad.Centre));
|
||||
AddStep("Place single hitcircle", () => InputManager.Click(MouseButton.Left));
|
||||
|
||||
AddAssert("Beatmap contains single hitcircle", () => editorBeatmap.HitObjects.Count == 1);
|
||||
checkMutations();
|
||||
|
||||
AddStep("Save", () => InputManager.Keys(PlatformAction.Save));
|
||||
|
||||
checkMutations();
|
||||
|
||||
AddStep("Exit", () => InputManager.Key(Key.Escape));
|
||||
|
||||
AddUntilStep("Wait for main menu", () => Game.ScreenStack.CurrentScreen is MainMenu);
|
||||
@ -59,9 +66,16 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
AddStep("Enter editor", () => InputManager.Key(Key.Number5));
|
||||
|
||||
AddUntilStep("Wait for editor load", () => editor != null);
|
||||
|
||||
checkMutations();
|
||||
}
|
||||
|
||||
private void checkMutations()
|
||||
{
|
||||
AddAssert("Beatmap contains single hitcircle", () => editorBeatmap.HitObjects.Count == 1);
|
||||
AddAssert("Beatmap has correct overall difficulty", () => editorBeatmap.Difficulty.OverallDifficulty == 7);
|
||||
AddAssert("Beatmap has correct difficulty name", () => editorBeatmap.BeatmapInfo.Version == "diffname");
|
||||
AddAssert("Beatmap has correct metadata", () => editorBeatmap.BeatmapInfo.Metadata.Artist == "artist" && editorBeatmap.BeatmapInfo.Metadata.Title == "title");
|
||||
AddAssert("Beatmap has correct difficulty name", () => editorBeatmap.BeatmapInfo.Version == "difficulty");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user