1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:02:55 +08:00

Add failing test for mod overlay not closing on entering skin editor

This commit is contained in:
Bartłomiej Dach 2022-05-07 22:47:19 +02:00
parent a3e61fddcb
commit bdea6d8654
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -4,6 +4,7 @@
using System.Linq;
using NUnit.Framework;
using osu.Framework.Extensions;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Testing;
using osu.Game.Overlays.Settings;
@ -133,6 +134,16 @@ namespace osu.Game.Tests.Visual.Navigation
AddAssert("no mod selected", () => !((Player)Game.ScreenStack.CurrentScreen).Mods.Value.Any());
}
[Test]
public void TestModOverlayClosesOnOpeningSkinEditor()
{
advanceToSongSelect();
AddStep("open mod overlay", () => songSelect.ModSelectOverlay.Show());
openSkinEditor();
AddUntilStep("mod overlay closed", () => songSelect.ModSelectOverlay.State.Value == Visibility.Hidden);
}
private void switchToGameplayScene()
{
AddStep("Click gameplay scene button", () => skinEditor.ChildrenOfType<SkinEditorSceneLibrary.SceneButton>().First(b => b.Text == "Gameplay").TriggerClick());