-
Notifications
You must be signed in to change notification settings - Fork 289
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
Fix off-by-one when specifying count with inputText #2123
base: main
Are you sure you want to change the base?
Conversation
… of taps occur Repeated tests show that the emulator can be slightly inconsistent and occasionally add an extra tap
47c1305
to
e75a143
Compare
uiDevice.pressDelete() | ||
Thread.sleep(50) // Attempt to ensure perfect count of taps on emulators |
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.
Wouldn't encourage doing this. Let's avoid having random sleeps in the code. It becomes very hard to reason about slowness and failures due to these.
Can you explain why is this exactly needed and if there is something other than a sleep we could do?
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.
Before this sleep was in, I'd occasionally see 1 extra or 1 too few presses of the delete key.
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.
There's a chance that shorter sleeps would be sufficient, or that the API could be improved to block until ready?
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.
Yup I'd vote for choosing an API that reasons about that and includes wait as much in needed.
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.
What's the way forward with this change?
Would you accept a //TODO
?
Proposed changes
Self-evident 1 character change to fix a problem where we're always deleting 1 character extra. Background in the linked issue.
Testing
Issues fixed
#2122