Skip to content

Commit d2a41a0

Browse files
committed
feat: set testTagsAsResourceId true
1 parent e900541 commit d2a41a0

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

app/src/main/java/to/bitkit/ui/MainActivity.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import androidx.compose.animation.fadeOut
1010
import androidx.compose.runtime.LaunchedEffect
1111
import androidx.compose.runtime.getValue
1212
import androidx.compose.runtime.rememberCoroutineScope
13+
import androidx.compose.ui.Modifier
14+
import androidx.compose.ui.semantics.semantics
15+
import androidx.compose.ui.semantics.testTagsAsResourceId
1316
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
1417
import androidx.fragment.app.FragmentActivity
1518
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -75,7 +78,11 @@ class MainActivity : FragmentActivity() {
7578
installSplashScreen()
7679
enableAppEdgeToEdge()
7780
setContent {
78-
AppThemeSurface {
81+
AppThemeSurface(
82+
modifier = Modifier.semantics {
83+
testTagsAsResourceId = true // see https://github.com/appium/appium/issues/15138
84+
}
85+
) {
7986
val scope = rememberCoroutineScope()
8087
if (!walletViewModel.walletExists) {
8188
val startupNavController = rememberNavController()

app/src/main/java/to/bitkit/ui/theme/Theme.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import androidx.compose.material3.darkColorScheme
88
import androidx.compose.material3.lightColorScheme
99
import androidx.compose.runtime.Composable
1010
import androidx.compose.runtime.Stable
11+
import androidx.compose.ui.Modifier
1112
import androidx.compose.ui.graphics.Color
1213

1314
val Gray100 = Color(0xFFF4F4F4)
@@ -51,11 +52,15 @@ private object ColorPalette {
5152

5253
@Composable
5354
internal fun AppThemeSurface(
55+
modifier: Modifier = Modifier,
5456
content: @Composable () -> Unit,
5557
) {
5658
val isSystemInDarkTheme = true // isSystemInDarkTheme() // use computed value for dark theme
5759
AppTheme(inDarkTheme = isSystemInDarkTheme) {
58-
Surface(content = content)
60+
Surface(
61+
content = content,
62+
modifier = modifier,
63+
)
5964
}
6065
}
6166

0 commit comments

Comments
 (0)