Fixed
Status Update
Comments
nk...@google.com <nk...@google.com> #2
Here's a really detailed StackOverflow answer that seems to point out some things to look at in relation to this behaviour:
http://stackoverflow.com/a/14293528/238753
nk...@google.com <nk...@google.com>
nk...@google.com <nk...@google.com> #3
Thank you for your feedback. We assure you that we are doing our best to address the issue reported, however our product team has shifted work priority that doesn't include this issue. For now, we will be closing the issue as won't fix obsolete. If this issue currently still exists, we request that you log a new issue along with latest bug report here https://goo.gl/TbMiIO .
Description
I tried making a test case to verify that an error state has disappeared from an edittext, and noticed that the implementation of hasErrorText unconditionally dereferences view.getError(), which makes it impossible to use it to test against against the absence of an error state.
is it possible to update the code to support checks against null? For instance, the following one-line change in ViewMatchers.java should allow a nullValue matcher:
- return stringMatcher.matches(view.getError().toString());
+ return stringMatcher.matches((view.getError() != null) ? view.getError().toString() : null);
In addition, it seems that the documentation for withHint explicitly indicates that null is an option, whereas that mention is absent for getErrorText even though the situation exists in practice.