-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update gamepad helper #3152
Update gamepad helper #3152
Conversation
@chingucoding can you pull master to pick up the CI build fix that just went in? |
{ | ||
Wait.ForMilliseconds(10); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer using something like this
microsoft-ui-xaml/dev/SwipeControl/SwipeControl_InteractionTests/SwipeControlTests.cs
Line 1916 in 8ce1910
checkBox.GetToggledWaiter().TryWait(TimeSpan.FromMilliseconds(millisecondsTimeout)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to that. Is there any documentation on this? I can't seem to find any helpful documents on the Microsoft.Windows.Apps.Test.Foundation namespace or TAEF 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think unfortunately not, @kmahone might know something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also just to be sure, TryWait in this case tries to either wait for the value to change or continue after 50 milliseconds right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to see the source by using F12 in VS. I think that after the timespan this will throw, and I think there is an optional parameter to make it continue without throwing instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
This updates the GamePad helper with the hope to improve the reliability for tests that inject GamePad input.
General idea was: Press button, wait 50 milliseconds, lift button.
New idea: Press button, wait for testframe to report input was received, wait for idle and lift button again.
If the testframe doesn't have the checkbox to report it received the input, we fallback to the old behavior.
Motivation and Context
How Has This Been Tested?
Ran tests multiple times, though they were reliable on my machine before this change too.
How should we test this?
I think we should run CI with the changes, if everything goes fine, we can try reenabling tests and run the CI multiple times to determine if those tests are reliable enough.
The tests that are currently disabled due to gamepad issues are:
Screenshots (if appropriate):