From be16e0e538465369aa9e33223f2814b34fdbddaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 18 Dec 2023 12:47:42 +0100 Subject: [PATCH] Add failing test for adding collection w/ name colliding w/\ default items --- .../TestSceneManageCollectionsDialog.cs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/osu.Game.Tests/Visual/Collections/TestSceneManageCollectionsDialog.cs b/osu.Game.Tests/Visual/Collections/TestSceneManageCollectionsDialog.cs index cfa45ec6ef..747cf73baf 100644 --- a/osu.Game.Tests/Visual/Collections/TestSceneManageCollectionsDialog.cs +++ b/osu.Game.Tests/Visual/Collections/TestSceneManageCollectionsDialog.cs @@ -166,6 +166,29 @@ public void TestCollectionNameCollisions() }))); } + [Test] + public void TestCollectionNameCollisionsWithBuiltInItems() + { + AddStep("add dropdown", () => + { + Add(new CollectionDropdown + { + Anchor = Anchor.TopRight, + Origin = Anchor.TopRight, + RelativeSizeAxes = Axes.X, + Width = 0.4f, + }); + }); + AddStep("add two collections which collide with default items", () => Realm.Write(r => r.Add(new[] + { + new BeatmapCollection(name: "All beatmaps"), + new BeatmapCollection(name: "Manage collections...") + { + BeatmapMD5Hashes = { beatmapManager.GetAllUsableBeatmapSets().First().Beatmaps[0].MD5Hash } + }, + }))); + } + [Test] public void TestRemoveCollectionViaButton() {