Open joshallenit opened 2 years ago
Thanks for raising this, I am also having a hard time testing it. Is there any other known methods by which we could click on the drop down selection ( with extra implementation)
... Is there any other known methods by which we could click on the drop down selection ( with extra implementation)
@maanuanubhav999 Nope, because the dropdown item is never inflated and so does not exist to click on.
@joshallenit What about trying native graphics mode with latest Robolectric?
Description
Hi, this is more of a question as to what the systemic limitations of Robolectric are, rather than asking for a fix.
I am trying to test clicking on a drop down selection of an AutoCompleteTextView. I created a test in /androidTest and a near identical test under /test. FragmentScenario + Espresso is used to do the actual testing.
I notice that the existing test for AutoCompleteTextView in the Roblectric repository only tests the count of the adapter, not whether the drop-down is in view hierarchy.
Is Robolectric intended to work in this case? I would like to know if the "write-once, run-anywhere" idea is ever going to be viable.
Thanks!
Steps to Reproduce
Example code
Expected result
Actual result
Robolectric & Android Version
Robolectric 4.7.3, Android SDK 31
Link to a public git repo demonstrating the problem:
https://github.com/joshallenit/issue-robolectric-autocompletetextview