1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-08 07:02:54 +08:00

Merge pull request #31785 from peppy/fix-carousel-tests

Fix carousel tests failing due to dependency on depth ordering
This commit is contained in:
Bartłomiej Dach 2025-02-04 12:06:57 +01:00 committed by GitHub
commit 95a1b0e7cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -175,9 +175,10 @@ namespace osu.Game.Tests.Visual.SongSelect
{
AddStep($"click panel at index {index}", () =>
{
Carousel.ChildrenOfType<T>()
Carousel.ChildrenOfType<UserTrackingScrollContainer>().Single()
.ChildrenOfType<T>()
.Where(p => ((ICarouselPanel)p).Item?.IsVisible == true)
.Reverse()
.OrderBy(p => p.Y)
.ElementAt(index)
.TriggerClick();
});