diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerQueueList.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerQueueList.cs index d6b53819c9..83c611e325 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerQueueList.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerQueueList.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System.Collections.Generic; using System.Linq; using NUnit.Framework; using osu.Framework.Graphics; @@ -121,6 +122,28 @@ namespace osu.Game.Tests.Visual.Multiplayer assertPositionStep(item9, 8); } + [Test] + public void TestItemsReorderedWhenQueueModeChanged() + { + changeQueueModeStep(QueueMode.AllPlayers); + + var items = new List(); + + for (int i = 0; i < 8; i++) + items.Add(addItemStep(i <= 3 ? 1 : 2)); + + for (int i = 0; i < 8; i++) + assertPositionStep(items[i], i); + + changeQueueModeStep(QueueMode.AllPlayersRoundRobin); + + for (int i = 0; i < 4; i++) + { + assertPositionStep(items[i], i * 2); // Items by user 1. + assertPositionStep(items[i + 4], i * 2 + 1); // Items by user 2. + } + } + /// /// Adds a step to create a new playlist item. ///