The other thing i’m struggling with is complex sem...
# compose
m
The other thing i’m struggling with is complex semantic properties. Something like SemanticProperties.Text. The expectValue function is going to do a direct comparison. I’m looking for something more along the lines of the “argThat” type function you’d use with mockito. Would i just create a SemanticsMatcher instance rather than use expectValue I assume?
a
certainly creating your own
SemanticsMatcher
is powerful enough to solve any matching problem, but it sounds like you might want to reach for the text-specific convenience helpers. See examples of how to use them here: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]oidx/compose/ui/test/assertions/AssertText.kt?q=AssertText.kt