mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 00:13:10 +08:00
Add assertion covering free mod selection mod validity filter
This commit is contained in:
parent
9942b0a946
commit
4b6d42c7e8
@ -1,8 +1,11 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Testing;
|
||||||
|
using osu.Game.Overlays.Mods;
|
||||||
using osu.Game.Screens.OnlinePlay;
|
using osu.Game.Screens.OnlinePlay;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Multiplayer
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
@ -18,6 +21,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
State = { Value = Visibility.Visible }
|
State = { Value = Visibility.Visible }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AddAssert("all visible mods are playable",
|
||||||
|
() => this.ChildrenOfType<ModPanel>()
|
||||||
|
.Where(panel => panel.IsPresent)
|
||||||
|
.All(panel => panel.Mod.HasImplementation && panel.Mod.UserPlayable));
|
||||||
|
|
||||||
AddToggleStep("toggle visibility", visible =>
|
AddToggleStep("toggle visibility", visible =>
|
||||||
{
|
{
|
||||||
if (freeModSelectScreen != null)
|
if (freeModSelectScreen != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user