1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 23:53:21 +08:00

Add assertion covering free mod selection mod validity filter

This commit is contained in:
Bartłomiej Dach 2022-04-17 16:54:30 +02:00
parent 9942b0a946
commit 4b6d42c7e8
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -1,8 +1,11 @@
// 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.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Graphics.Containers;
using osu.Framework.Testing;
using osu.Game.Overlays.Mods;
using osu.Game.Screens.OnlinePlay;
namespace osu.Game.Tests.Visual.Multiplayer
@ -18,6 +21,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
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 =>
{
if (freeModSelectScreen != null)