summaryrefslogtreecommitdiffhomepage
path: root/android/app
diff options
context:
space:
mode:
authorDavid Göransson <david.goransson@mullvad.net>2025-07-08 16:09:54 +0200
committerDavid Göransson <david.goransson@mullvad.net>2025-07-10 13:12:04 +0200
commitbcb4749950f75edd63b2200e4c15fc73479a7fb3 (patch)
treecfaac4be58e42b2fdaed9aad223dd006c851935a /android/app
parent396e0791d037fd939d9837ee1f2768ad5c73dc49 (diff)
downloadmullvadvpn-bcb4749950f75edd63b2200e4c15fc73479a7fb3.tar.xz
mullvadvpn-bcb4749950f75edd63b2200e4c15fc73479a7fb3.zip
Add e2e test for Google play purchases
Diffstat (limited to 'android/app')
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/AddTimeBottomSheet.kt8
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadModalBottomSheet.kt4
2 files changed, 10 insertions, 2 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/AddTimeBottomSheet.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/AddTimeBottomSheet.kt
index edb28e0e69..083a271dfd 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/AddTimeBottomSheet.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/AddTimeBottomSheet.kt
@@ -30,6 +30,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalUriHandler
+import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
@@ -53,6 +54,7 @@ import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.lib.theme.Dimens
import net.mullvad.mullvadvpn.lib.theme.color.AlphaDisabled
import net.mullvad.mullvadvpn.lib.theme.color.AlphaVisible
+import net.mullvad.mullvadvpn.lib.ui.tag.ADD_TIME_BOTTOM_SHEET_TITLE_TEST_TAG
import net.mullvad.mullvadvpn.util.Lc
import net.mullvad.mullvadvpn.viewmodel.AddMoreTimeSideEffect
import net.mullvad.mullvadvpn.viewmodel.AddTimeViewModel
@@ -500,7 +502,11 @@ private fun ColumnScope.Loading(onBackgroundColor: Color, backgroundColor: Color
@Composable
private fun SheetTitle(title: String, onBackgroundColor: Color, backgroundColor: Color) {
- HeaderCell(text = title, background = backgroundColor)
+ HeaderCell(
+ text = title,
+ background = backgroundColor,
+ modifier = Modifier.testTag(ADD_TIME_BOTTOM_SHEET_TITLE_TEST_TAG),
+ )
HorizontalDivider(
color = onBackgroundColor,
modifier = Modifier.padding(horizontal = Dimens.mediumPadding),
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadModalBottomSheet.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadModalBottomSheet.kt
index 83f4758db4..c7b5e0c582 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadModalBottomSheet.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadModalBottomSheet.kt
@@ -15,6 +15,8 @@ import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.semantics.semantics
+import androidx.compose.ui.semantics.testTagsAsResourceId
import androidx.compose.ui.tooling.preview.Preview
import net.mullvad.mullvadvpn.compose.cell.HeaderCell
import net.mullvad.mullvadvpn.compose.cell.IconCell
@@ -53,7 +55,7 @@ fun MullvadModalBottomSheet(
onDismissRequest = onDismissRequest,
sheetState = sheetState,
containerColor = backgroundColor,
- modifier = modifier,
+ modifier = modifier.semantics { testTagsAsResourceId = true },
contentWindowInsets = { WindowInsets(0, 0, 0, 0) }, // No insets
dragHandle = { BottomSheetDefaults.DragHandle(color = onBackgroundColor) },
) {