mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
Fix more tests reading in wrong order
This commit is contained in:
parent
d66daf15a5
commit
fea6a54432
@ -265,6 +265,7 @@ namespace osu.Game.Tests.Visual.Collections
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Solo]
|
||||
public void TestCollectionRenamedExternal()
|
||||
{
|
||||
BeatmapCollection first = null!;
|
||||
@ -341,6 +342,6 @@ namespace osu.Game.Tests.Visual.Collections
|
||||
=> AddUntilStep($"{count} collections shown", () => dialog.ChildrenOfType<DrawableCollectionListItem>().Count() == count + 1); // +1 for placeholder
|
||||
|
||||
private void assertCollectionName(int index, string name)
|
||||
=> AddUntilStep($"item {index + 1} has correct name", () => dialog.ChildrenOfType<DrawableCollectionListItem>().ElementAt(index).ChildrenOfType<TextBox>().First().Text == name);
|
||||
=> AddUntilStep($"item {index + 1} has correct name", () => dialog.ChildrenOfType<DrawableCollectionList>().Single().OrderedItems.ElementAt(index).ChildrenOfType<TextBox>().First().Text == name);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
@ -29,7 +30,11 @@ namespace osu.Game.Collections
|
||||
|
||||
private IDisposable? realmSubscription;
|
||||
|
||||
protected override FillFlowContainer<RearrangeableListItem<Live<BeatmapCollection>>> CreateListFillFlowContainer() => new Flow
|
||||
private Flow flow = null!;
|
||||
|
||||
public IEnumerable<Drawable> OrderedItems => flow.FlowingChildren;
|
||||
|
||||
protected override FillFlowContainer<RearrangeableListItem<Live<BeatmapCollection>>> CreateListFillFlowContainer() => flow = new Flow
|
||||
{
|
||||
DragActive = { BindTarget = DragActive }
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user