Skip to content
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

openActionBarOverflowOrOptionsMenu does not work with non-english locale & proguard used #144

Open
GoogleCodeExporter opened this issue May 26, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. build a simple test with openActionBarOverflowOrOptionsMenu()
2. use proguard for test build 
2. set device/avd to non english locale (in my case german)
3. run test

or:
1. checkout https://github.com/issuerepro/android-proguard-testing
2. use english avd/device
3. run gradlew connectedcheck
4. set to non-english
5. run gradlew connectedcheck again

What is the expected output?
passing test

What do you see instead?
*.MainActivityTest > testImprint[Galaxy_Nexus_API_21_with_Google(AVD) - 5.0.2] 
FAILED
        android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: ((is displayed on the screen to the user and with content description: is "More options") or (is displayed on the screen to the user and with class name: a string ending with "OverflowMenuButton"))

What version of the product are you using? On what operating system?
- com.android.support.test.espresso:espresso-core:2.0
- com.android.support.test:testing-support-lib:0.1
- com.android.tools.build:gradle:1.2.0-beta4
- API 21 AVD

Please provide any additional information below.
the test passes when running without obfuscation.

i think the issue is in the "OVERFLOW_BUTTON_MATCHER" in Espress.class
it checks for a view with descrtiption "More options" or a view with classname 
ending in"OverflowMenuButton". the first one is invalidated by the non engish 
locale and i asume the second one by the obfuscation.


best would be - if it exists - to use an android.R.strings.XXX id instead of 
the hardcoded "More options".

Original issue reported on code.google.com by [email protected] on 18 Apr 2015 at 8:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant