I recently wrapped an XML Button view inside a com...
# compose-android
a
I recently wrapped an XML Button view inside a compose Column and now I am running into issues with espresso
perform(click())
not working. Has anyone experienced something similar before or has any advice on how to debug this?
z
Probably not gonna get much help unless you share some code - what does your composable look like that you’re embedding? What is your test code that’s failing?
j
Are you sure you're using the latest espresso? We had issues with clicking issues but they got fixed in 1.6 AFAIK.
a
Sorry for the late response. We are on 3.3.0 for espresso This is roughly how the setup is done:
Copy code
Column(modifier = modifier, verticalArrangement = Arrangement.spacedBy(20.dp)) {
            AndroidView(factory = ::FrameLayout, modifier) {
                  // Button
            }
        }
The test uses
Copy code
waitForViewInRoot(withText("Text on the button"))
            .check(matches(isDisplayed()))
            .perform(click())