mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 19:27:26 +08:00
Clear lists on room leave
This commit is contained in:
parent
fc8c8685b8
commit
a4cd22d5a9
@ -113,6 +113,19 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
assertItemInHistoryListStep(1, 2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestListsClearedWhenRoomLeft()
|
||||
{
|
||||
addItemStep();
|
||||
AddStep("finish current item", () => Client.FinishCurrentItem());
|
||||
|
||||
AddStep("leave room", () => RoomManager.PartRoom());
|
||||
AddUntilStep("wait for room part", () => Client.Room == null);
|
||||
|
||||
AddUntilStep("item 0 not in lists", () => !inHistoryList(0) && !inQueueList(0));
|
||||
AddUntilStep("item 1 not in lists", () => !inHistoryList(0) && !inQueueList(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJoinRoomWithMixedItemsAddedInCorrectLists()
|
||||
{
|
||||
@ -212,7 +225,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
base.OnRoomUpdated();
|
||||
|
||||
if (Room == null)
|
||||
{
|
||||
historyList.Items.Clear();
|
||||
queueList.Items.Clear();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!firstPopulation) return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user