https://kotlinlang.org logo
#compose
Title
# compose
m

mattinger

05/19/2022, 4:57 PM
Has anyone been able to test a dropdown style control? We built a control with a card, that when you click on it would display a DropdownMenu for the user to pick items from (think the Spinner in the XML world). However, when i’m trying to test it in the robolectric environment with a ComposeTestRule, i can perform the click, but i can never do anything else, presumably because the idler things that compose is still doing something. As a result, it just sits there on the next call to
onNode
type functions. As a side note, it works in an espresso test, just not robolectric.
a

Alex Vanyo

05/19/2022, 8:02 PM
Which version of Compose are you using? I think there was a bug in this area fixed rather recently, let me find it…
m

mattinger

05/19/2022, 8:02 PM
1.1.1
👍 1
And I’m not able to upgrade to an alpha version.
For reference, i’m also on robolectric 4.7.3
a

Alex Vanyo

05/19/2022, 8:08 PM
https://issuetracker.google.com/issues/224974381 looks like the same issue, the fix is first included in 1.2.0-beta01
m

mattinger

05/19/2022, 8:09 PM
thanks @Alex Vanyo. i guess we chalk it up to a known issue and wait for 1.2.0 to release.
👍 1
And maybe someday we’ll get some of these missing components in the toolkit directly.
14 Views