-
Notifications
You must be signed in to change notification settings - Fork 318
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
Espresso.openActionBarOverflowOrOptionsMenu sometimes performs long click #423
Comments
copybara-service bot
pushed a commit
that referenced
this issue
Nov 19, 2024
The changes from `Iterable<? super Foo>` to `Iterable<? extends Foo>` are due to hamcrest/JavaHamcrest@242604a #MIGRATION_3P_JAVA_HAMCREST__DEFAULT - 3fa841d91fb61beec6565c5deff3a1854c46301c Revert version to 3.0-SNAPSHOT by Joe Schmetzer <joe@exubero.com> - 4e2b71c59c0df5d6e21c7fed5ff78a07c11676b1 Add instructions for releasing to Maven Central by Joe Schmetzer <joe@exubero.com> - 1adc3517d51b8a4691a69412778bde125ec04365 Fix javadoc title by Joe Schmetzer <joe@exubero.com> - 68984b85e869df6a888fffcad87e4b676a8fc0ac Version 3.0 by Joe Schmetzer <joe@exubero.com> - ca4dcfb28f04233f0e5747179e4572a62b980c4f Update CHANGES.md for v3.0 by Joe Schmetzer <joe@exubero.com> - e4c5bdd4b5faef05c2e4fa17971b18302be55a30 Version 3.1-SNAPSHOT by Joe Schmetzer <joe@exubero.com> - 21a05292a873c87424d7a3aca94a40babc899bc7 Javadoc cleanup (#420) by Joe Schmetzer <joe@exubero.com> - 6bb90de5c5e114f58d862ed2ad336671c7f50fc1 Regenerate javadoc in documentation by Joe Schmetzer <joe@exubero.com> - 3019f1bee22f9666f89ce286a1a1facc3c8eba7f Optional matchers (#421) by Sergey Chernov <serega.morph@gmail.com> - 01c776cc62189c26764e73f1a7c9ae813420a53f Fill in missing javadoc for Optional matchers by Joe Schmetzer <joe@exubero.com> - b943810ea32c72d4ae94488e76be8318eaa3239d Derive version from git (#419) by Joe Schmetzer <joe@exubero.com> - d11ad94270f0ecba4f5cdd3f84d084109e1eac58 Update CHANGES.md by Joe Schmetzer <joe@exubero.com> - 242604acb03f0a5f70d2181e21aa59800676e976 Allow matching against polymorphic collections (#422) by Joe Schmetzer <joe@exubero.com> - 246967c4c9b5f2de07a306bb63a803c2cb7eb4df Upgrade gradle version 8.9 -> 8.10.1 by Joe Schmetzer <joe@exubero.com> - 581d6ba465a4505f35bbfd45424961f1da979e3a Migrate all tests to JUnit Jupiter (#424) by Joe Schmetzer <joe@exubero.com> - 1bed2f5ff82cee0760c9dc508230c0d5ac7ce295 Bump org.junit.jupiter:junit-jupiter from 5.11.2 to 5.11.... by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - 1e4230f1424a85cbc5e64cce1dbf08acb7fa0aa8 Add matcher for thrown exceptions in `Runnable` (#423) by Guillermo Gutiérrez <ggalmazor@gmail.com> - ff2c25bbfca623b2ffe27965cbe2d2ad00c36a04 Matchers.throwsException will return interface by Joe Schmetzer <joe@exubero.com> - 544a4cf4cf98e9080c13722ea0c664d4ac5d6f29 Update changes with thrown exceptions by Joe Schmetzer <joe@exubero.com> - f0545a5189513ff2abdf226c061d18ac40e7510a Add throwsException matcher for throwable instance by Joe Schmetzer <joe@exubero.com> - 5dc01127c073923824c2202db1f1c85ea502a074 Restore public constructors for compatibility (#428) by Joe Schmetzer <joe@exubero.com> PiperOrigin-RevId: 698081489
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Inside openActionBarOverflowOrOptionsMenu is a call to ViewActions.click(). Creating click actions this way is flaky on devices that are prone to interpret short-clicks as long-clicks. It would be preferred to use the ViewAction.click(ViewAction rollbackAction) constructor instead, or least provide the option.
Steps to Reproduce
Run an Espresso test which calls openActionBarOverflowOrOptionsMenu on A.) slow device, or B.) any device with a very short long-click timeout (you can configure this via ADB:
adb shell settings put secure long_press_timeout 10
).Expected Results
If a long-click is accidentally performed, Espresso will be given a chance to roll-back its effects before re-trying it.
Actual Results
Espresso performs an undesirable long-click; the test does not proceed as expected.
AndroidX Test and Android OS Versions
AndroidX: 1.2.0
Espresso: 3.2.0
Android OS: API 23
Link to a public git repo demonstrating the problem:
Unfortunately I am not permitted to share my employer's code.
The text was updated successfully, but these errors were encountered: