diff options
| author | David Göransson <david.goransson@mullvad.net> | 2025-07-29 15:37:07 +0200 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2025-07-29 16:07:29 +0200 |
| commit | 34c6f795b484494ee81614fff8baf7852ca2d469 (patch) | |
| tree | 00a1ef671391fd110ec3bafdb28185c708d64e2d /android/lib/ui/component/src | |
| parent | 93d42e2e3d688e19bb16c41ddc0a9aa119a80903 (diff) | |
| download | mullvadvpn-34c6f795b484494ee81614fff8baf7852ca2d469.tar.xz mullvadvpn-34c6f795b484494ee81614fff8baf7852ca2d469.zip | |
Check for both tag and name in location cells for e2e tests
Diffstat (limited to 'android/lib/ui/component/src')
| -rw-r--r-- | android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/SelectableRelayListItem.kt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/SelectableRelayListItem.kt b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/SelectableRelayListItem.kt index 289eb5aa9f..8c38610f9e 100644 --- a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/SelectableRelayListItem.kt +++ b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/SelectableRelayListItem.kt @@ -43,7 +43,10 @@ import net.mullvad.mullvadvpn.lib.ui.component.ExpandChevron import net.mullvad.mullvadvpn.lib.ui.designsystem.RelayListItem import net.mullvad.mullvadvpn.lib.ui.designsystem.RelayListItemDefaults import net.mullvad.mullvadvpn.lib.ui.designsystem.RelayListTokens +import net.mullvad.mullvadvpn.lib.ui.tag.CUSTOM_LIST_ENTRY_NAME_TAG import net.mullvad.mullvadvpn.lib.ui.tag.EXPAND_BUTTON_TEST_TAG +import net.mullvad.mullvadvpn.lib.ui.tag.GEOLOCATION_NAME_TAG +import net.mullvad.mullvadvpn.lib.ui.tag.RECENT_NAME_TAG @Composable @Preview @@ -100,6 +103,15 @@ fun SelectableRelayListItem( } Name( + modifier = + Modifier.testTag( + when (relayListItem) { + is RelayListItem.CustomListEntryItem -> CUSTOM_LIST_ENTRY_NAME_TAG + is RelayListItem.CustomListItem -> CUSTOM_LIST_ENTRY_NAME_TAG + is RelayListItem.GeoLocationItem -> GEOLOCATION_NAME_TAG + is RelayListItem.RecentListItem -> RECENT_NAME_TAG + } + ), name = relayListItem.hop.displayName(LocalContext.current), state = relayListItem.state, active = relayListItem.hop.isActive, |
