I just updated Compose, Gradle and Kotlin plugin. ...
# compose-android
a
I just updated Compose, Gradle and Kotlin plugin. Compose BOM went from 2025.06.01 -> 2025.08.00. Now like 30% of all out Unit tests started to fail. Anyone else experienced this? 🧵
Some logs for the failed tests look like this but not all.
Copy code
java.lang.AssertionError: Failed to retrieve bounds of the node.
Reason: Expected exactly '1' node but could not find any node that satisfies: ((((Role = 'Button')[0]).children).filterToOne(Role = 'Image'))

at androidx.compose.ui.test.SemanticsNodeInteraction.fetchOneOrThrow(SemanticsNodeInteraction.kt:178)
at androidx.compose.ui.test.SemanticsNodeInteraction.fetchOneOrThrow$default(SemanticsNodeInteraction.kt:150)
at androidx.compose.ui.test.SemanticsNodeInteraction.fetchSemanticsNode(SemanticsNodeInteraction.kt:84)
at androidx.compose.ui.test.BoundsAssertionsKt.withUnclippedBoundsInRoot(BoundsAssertions.kt:259)
at androidx.compose.ui.test.BoundsAssertionsKt.assertWidthIsEqualTo-3ABfNKs(BoundsAssertions.kt:45)
``````
a
Hey Adrian, there were some breaking changes in 1.9-beta01 documented in https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.9.0-beta01. Basically, depending on your UI, there may be additional nodes added to the semantics tree, which may break assertions that make assumptions about the node hierarchy (e.g., onChildren). A way to fix this is to either add a test tag directly to the node you want to assert something about and use onNodeWithTag, or use more flexible ancestor/descendant matchers. In you example, it could be something like this:
Copy code
hasAnyAncestor(SemanticsMatcher.expectValue(SemanticsProperties.Role, Role.Button)) and
     SemanticsMatcher.expectValue(SemanticsProperties.Role, Role.Image))
👀 1
1
a
Thanks I’ll look into it! 🙌
👍 1
👍🏾 1