Upgrading to Compose 1.7 (tested again today on ne...
# compose-android
a
Upgrading to Compose 1.7 (tested again today on new beta05), one issue I have been stuck on is a failing unit test we have that does performClick() on a material Button. I have narrowed it down to the RoundedCornerShape not having the same values for each of the corners (0 on the bottomEnd) being the thing that seems to cause it. Unfortunately, doing the same thing in a new standalone test app is not reproducing the problem so maybe something else is also involved. Any ideas?
Copy code
val pillRadius = 18.dp
Button(
    modifier = modifier,
    shape = RoundedCornerShape(topStart = pillRadius, topEnd = pillRadius, bottomStart = pillRadius, bottomEnd = 0.dp),
    onClick = onClick,
) {
    Text(text, style = MaterialTheme.typography.body1)
}
material (not 3) button wrapper has this. I tried debugging into the gesture handling and the mouse events are being fired, I think something about previous pressed state was different in the mouseup event changing hit test behavior
y
Not something like LayoutDirection difference?
a
Doesn't seem like it. Within our app project I have a test that is just that code wrapped in our Theme {} and doing the performClick on it. Fortunately its in obsolete code so I guess I'll just delete it, but something odd going on we'll see if it pops up somewhere else or in anyone else here upgrading to 1.7
y
If it's a failing unit test you could grab a screenshot with Roborazzi/Robolectric if you care enough.