Ensure testTag does not resize the Composable.
This commit is contained in:
parent
aedfed3be9
commit
3c81f12f93
1 changed files with 4 additions and 6 deletions
|
|
@ -26,9 +26,7 @@ import androidx.compose.ui.semantics.testTagsAsResourceId
|
|||
* Add a testTag to a Modifier, to be used by external tool, like TrafficLight for instance.
|
||||
*/
|
||||
@OptIn(ExperimentalComposeUiApi::class)
|
||||
fun Modifier.testTag(id: TestTag) = this.then(
|
||||
semantics {
|
||||
testTag = id.value
|
||||
testTagsAsResourceId = true
|
||||
}
|
||||
)
|
||||
fun Modifier.testTag(id: TestTag) = semantics {
|
||||
testTag = id.value
|
||||
testTagsAsResourceId = true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue