Fixed
Status Update
Comments
nk...@google.com <nk...@google.com> #2
this would be nice but given Compose and all other priorities, we are not planning to make any big investments in data binding (support KSP is a very big task).
nk...@google.com <nk...@google.com>
nk...@google.com <nk...@google.com> #3
Makes sense. And is there any way to trigger data binding without kapt plugin, assuming there are no custom binding adapters in given module?
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.