mirror of
https://github.com/ppy/osu
synced 2024-12-15 03:16:17 +00:00
Merge pull request #17300 from smoogipoo/testscene-button-click-improvement
Improve OsuManualInputManagerTestScene button clicking helper function
This commit is contained in:
commit
4d495cf969
@ -127,9 +127,9 @@ namespace osu.Game.Tests.Visual
|
||||
where T : Drawable
|
||||
{
|
||||
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
|
||||
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}", () =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user