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

Fix not handling IconButtons

This commit is contained in:
Dan Balasescu 2022-03-17 17:59:26 +09:00
parent e3cbde5099
commit 7b8fb341a5

View File

@ -127,9 +127,9 @@ namespace osu.Game.Tests.Visual
where T : Drawable where T : Drawable
{ {
if (typeof(T) == typeof(Button)) if (typeof(T) == typeof(Button))
AddUntilStep($"wait for {typeof(T).Name} enabled", () => (this.ChildrenOfType<T>().Single() as Button)?.Enabled.Value == true); AddUntilStep($"wait for {typeof(T).Name} enabled", () => (this.ChildrenOfType<T>().Single() as ClickableContainer)?.Enabled.Value == true);
else else
AddUntilStep($"wait for {typeof(T).Name} enabled", () => this.ChildrenOfType<T>().Single().ChildrenOfType<Button>().Single().Enabled.Value); AddUntilStep($"wait for {typeof(T).Name} enabled", () => this.ChildrenOfType<T>().Single().ChildrenOfType<ClickableContainer>().Single().Enabled.Value);
AddStep($"click {typeof(T).Name}", () => AddStep($"click {typeof(T).Name}", () =>
{ {