mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Adjust testcase to avoid random failures (#4735)
Adjust testcase to avoid random failures Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
@ -107,7 +107,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Spacing = new Vector2(10),
|
Spacing = new Vector2(10),
|
||||||
Padding = new MarginPadding { Bottom = 250 }
|
Padding = new MarginPadding { Bottom = 550 }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -132,11 +132,9 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
var loadedBackgrounds = backgrounds.Where(b => b.ContentLoaded);
|
var loadedBackgrounds = backgrounds.Where(b => b.ContentLoaded);
|
||||||
|
|
||||||
int initialLoadCount = 0;
|
AddUntilStep("some loaded", () => loadedBackgrounds.Any());
|
||||||
|
|
||||||
AddUntilStep("some loaded", () => (initialLoadCount = loadedBackgrounds.Count()) > 0);
|
|
||||||
AddStep("scroll to bottom", () => scrollContainer.ScrollToEnd());
|
AddStep("scroll to bottom", () => scrollContainer.ScrollToEnd());
|
||||||
AddUntilStep("some unloaded", () => loadedBackgrounds.Count() < initialLoadCount);
|
AddUntilStep("all unloaded", () => !loadedBackgrounds.Any());
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestUpdateableBeatmapBackgroundSprite : UpdateableBeatmapBackgroundSprite
|
private class TestUpdateableBeatmapBackgroundSprite : UpdateableBeatmapBackgroundSprite
|
||||||
|
Reference in New Issue
Block a user