Fix UpdateBeatmapSetButton intermittent test failure

Carousel would only expire items when off-screen. This meant that for a
case (like a test) where items are generally always on-screen,
`UpdateBeatmapSet` calls would result in panels remaining hidden but not
cleaned up.
This commit is contained in:
Dean Herbert
2022-07-21 16:24:46 +09:00
parent 3cfe624af1
commit fc0c9f76bd
2 changed files with 22 additions and 7 deletions

View File

@ -71,6 +71,7 @@ namespace osu.Game.Tests.Visual.SongSelect
carousel.UpdateBeatmapSet(testBeatmapSetInfo);
});
AddUntilStep("only one set visible", () => carousel.ChildrenOfType<DrawableCarouselBeatmapSet>().Count() == 1);
AddUntilStep("update button visible", () => getUpdateButton() != null);
AddStep("click button", () => getUpdateButton()?.TriggerClick());
@ -120,6 +121,7 @@ namespace osu.Game.Tests.Visual.SongSelect
carousel.UpdateBeatmapSet(testBeatmapSetInfo);
});
AddUntilStep("only one set visible", () => carousel.ChildrenOfType<DrawableCarouselBeatmapSet>().Count() == 1);
AddUntilStep("update button visible", () => getUpdateButton() != null);
AddStep("click button", () => getUpdateButton()?.TriggerClick());