mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:42:56 +08:00
Add failing test coverage for clearing sidebar contents
This commit is contained in:
parent
d233f3a3ab
commit
9d4bb2ecf7
@ -15,6 +15,7 @@ using osu.Game.Overlays.Settings;
|
||||
using osu.Game.Overlays.SkinEditor;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Screens.Edit.Components;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Screens.Play.HUD.HitErrorMeters;
|
||||
using osu.Game.Tests.Beatmaps.IO;
|
||||
@ -195,6 +196,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
openSkinEditor();
|
||||
AddAssert("blueprint container present", () => skinEditor.ChildrenOfType<SkinBlueprintContainer>().Count(), () => Is.EqualTo(1));
|
||||
AddAssert("placeholder not present", () => skinEditor.ChildrenOfType<NonSkinnableScreenPlaceholder>().Count(), () => Is.Zero);
|
||||
AddAssert("editor sidebars not empty", () => skinEditor.ChildrenOfType<EditorSidebar>().SelectMany(sidebar => sidebar.Children).Count(), () => Is.GreaterThan(0));
|
||||
|
||||
AddStep("add skinnable component", () =>
|
||||
{
|
||||
@ -206,10 +208,12 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddAssert("selection cleared", () => skinEditor.SelectedComponents, () => Has.Count.Zero);
|
||||
AddAssert("blueprint container not present", () => skinEditor.ChildrenOfType<SkinBlueprintContainer>().Count(), () => Is.Zero);
|
||||
AddAssert("placeholder present", () => skinEditor.ChildrenOfType<NonSkinnableScreenPlaceholder>().Count(), () => Is.EqualTo(1));
|
||||
AddAssert("editor sidebars empty", () => skinEditor.ChildrenOfType<EditorSidebar>().SelectMany(sidebar => sidebar.Children).Count(), () => Is.Zero);
|
||||
|
||||
advanceToSongSelect();
|
||||
AddAssert("blueprint container present", () => skinEditor.ChildrenOfType<SkinBlueprintContainer>().Count(), () => Is.EqualTo(1));
|
||||
AddAssert("placeholder not present", () => skinEditor.ChildrenOfType<NonSkinnableScreenPlaceholder>().Count(), () => Is.Zero);
|
||||
AddAssert("editor sidebars not empty", () => skinEditor.ChildrenOfType<EditorSidebar>().SelectMany(sidebar => sidebar.Children).Count(), () => Is.GreaterThan(0));
|
||||
}
|
||||
|
||||
private void advanceToSongSelect()
|
||||
|
Loading…
Reference in New Issue
Block a user