mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:12:05 +00:00
Ensure testTag does not resize the Composable.
This commit is contained in:
committed by
Benoit Marty
parent
aedfed3be9
commit
3c81f12f93
@@ -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.
|
* Add a testTag to a Modifier, to be used by external tool, like TrafficLight for instance.
|
||||||
*/
|
*/
|
||||||
@OptIn(ExperimentalComposeUiApi::class)
|
@OptIn(ExperimentalComposeUiApi::class)
|
||||||
fun Modifier.testTag(id: TestTag) = this.then(
|
fun Modifier.testTag(id: TestTag) = semantics {
|
||||||
semantics {
|
|
||||||
testTag = id.value
|
testTag = id.value
|
||||||
testTagsAsResourceId = true
|
testTagsAsResourceId = true
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user