1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Fix user dim test scene accumulating no fail instances in SelectedMods

The old design was apparently somehow tolerant of multiple instances of
the same mod in `SelectedMods`, but the new one is not.

Fix the test, because appending to a list of mods that was getting
modified by previous tests is generally not how tests should be
written.
This commit is contained in:
Bartłomiej Dach 2022-05-05 21:24:11 +02:00
parent 34cf4c6a38
commit 17c19063f7
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -1,7 +1,6 @@
// 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 System.Threading;
using NUnit.Framework;
using osu.Framework.Allocation;
@ -283,7 +282,7 @@ namespace osu.Game.Tests.Visual.Background
AddUntilStep("Song select has selection", () => songSelect.Carousel?.SelectedBeatmapInfo != null);
AddStep("Set default user settings", () =>
{
SelectedMods.Value = SelectedMods.Value.Concat(new[] { new OsuModNoFail() }).ToArray();
SelectedMods.Value = new[] { new OsuModNoFail() };
songSelect.DimLevel.Value = 0.7f;
songSelect.BlurLevel.Value = 0.4f;
});