diff options
| author | David Göransson <david.goransson@mullvad.net> | 2025-07-10 13:12:22 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2025-07-10 13:12:22 +0200 |
| commit | d8aa781b2058e1b89ebb367b09b82327ddfcd15f (patch) | |
| tree | 0e531e5b3342d36d12fc05219f32d7f3cbbfdfa4 /android/app | |
| parent | 079b39c33c4045cae61835502fdde9ad782dd937 (diff) | |
| parent | cbf238603a8a300613511772e32868078dff5e73 (diff) | |
| download | mullvadvpn-d8aa781b2058e1b89ebb367b09b82327ddfcd15f.tar.xz mullvadvpn-d8aa781b2058e1b89ebb367b09b82327ddfcd15f.zip | |
Merge branch 'in-app-purchase-e2e-test-droid-2031'
Diffstat (limited to 'android/app')
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) }, ) { |
