fix(folio): testTagsAsResourceId at App root + JS-bridge regression test

App.kt sets testTagsAsResourceId=true on the root Box semantics so
Compose's testTag surfaces as Android resource-id (and equivalent on
iOS via accessibilityIdentifier). Without this, testTag stays in the
Compose semantics tree but never reaches the runtime hierarchy that
UIAutomator and Sanderling read.

Also adds TestStateAxObjectSelectorTestTagAlias as a regression
test for the {testTag: ...} object selector resolving through the
SDK alias to resource-id at the JS bridge layer.
This commit is contained in:
pj committed 2026-04-26 15:14:54 +07:00
1 parent 9293deb858
commit 63708b21a0
2 files changed
+58 -1

No files matched your search

@@ -16,7 +16,10 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.testTagsAsResourceId
import app.folio.core.data.DriverFactory
import app.folio.core.data.Repository
import app.folio.core.data.SqlLedgerStore
@@ -32,6 +35,7 @@ import app.folio.ui.theme.LedgerTheme
import app.folio.ui.theme.LocalTokens
import app.folio.ui.theme.Tokens
@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun App(driverFactory: DriverFactory) {
var component by remember { mutableStateOf<AppComponent?>(null) }
@@ -50,7 +54,8 @@ fun App(driverFactory: DriverFactory) {
Modifier
.fillMaxSize()
.background(t.bg)
.windowInsetsPadding(WindowInsets.safeDrawing),
.windowInsetsPadding(WindowInsets.safeDrawing)
.semantics { testTagsAsResourceId = true },
contentAlignment = Alignment.Center,
) {
val c = component