I am trying to test using Espresso if my TextInputLayout
views have specific hint. I'd used a code as below:
Espresso.onView(ViewMatchers.withId(R.id.edit_text_email))
.check(ViewAssertions.matches(
ViewMatchers.withHint(R.string.edit_text_email_hint)))
This works fine for the normal EditText
views, not wrapped in TextInputLayout
. However when it wraps around, it no longer works.
I tried to use solution from Android Espresso - How to check EditText hint?, but it still does not working.
I also looked into: https://code.google.com/p/android/issues/detail?id=191261 that reported the issue, it says the workaround is quite easy by pointing to the current withHint
code, but I can't get it to work.
Any ideas to fix this issue?