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

Zach Klippenstein (he/him) [MOD]

03/29/2020, 8:32 PM
I’m trying to write some really basic UI tests with dev07's test library (
findByText
and friends), but even really simple assertions fail unexpectedly. Are there any limitations around what the semantics/testing infra can handle? More in thread.
👍🏻 1
This test, for example, tries to just assert some static text is displayed, to verify the app launched, but if you uncomment the commented line, it fails: https://github.com/zach-klippenstein/compose-backstack/blob/master/sample/src/androidTest/java/com/zachklipp/compose/backstack/sample/SampleAppTest.kt#L20-L23
I looked at the tests for Compose (on cs.android.com), and the most notable difference is that this one is testing a custom activity, so it’s using
AndroidComposeTestRule
instead of
createComposeRule
. However, I also tried writing tests without using a custom activity, and while the simplest one works, most of them also fail on basic assertions: https://github.com/zach-klippenstein/compose-backstack/blob/master/backstack/src/androidTest/java/com/zachklipp/compose/backstack/BackstackTest.kt
a

Andrey Kulikov

03/31/2020, 10:31 AM
hey, @Zach Klippenstein (he/him) [MOD] ! Unfortunately the person being working on the testing story is not in this slack yet, could you please file a bug here in meantime so he can help you: https://b.corp.google.com/issues/new?component=741505. Thanks!
👍 1
z

Zach Klippenstein (he/him) [MOD]

03/31/2020, 6:38 PM