diff options
| author | David Göransson <david.goransson@mullvad.net> | 2025-07-01 11:05:09 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2025-07-04 15:47:27 +0200 |
| commit | 0d5660226494abaf04dc619997bf4d6a27c637d8 (patch) | |
| tree | 0081e14129def76d6a57b32232e42411c2fbe10d /android/app/src/androidTest | |
| parent | ec99ebb96ab1015983ca20621d28eaef7f731460 (diff) | |
| download | mullvadvpn-0d5660226494abaf04dc619997bf4d6a27c637d8.tar.xz mullvadvpn-0d5660226494abaf04dc619997bf4d6a27c637d8.zip | |
Restructure & redesign components
- Change to new look and feel of list items
- Add support for clicking inactive relays, with info message
if relay, country or custom list is unavailable.
Diffstat (limited to 'android/app/src/androidTest')
3 files changed, 19 insertions, 11 deletions
diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListLocationsScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListLocationsScreenTest.kt index d556fe5d10..a7bed534ba 100644 --- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListLocationsScreenTest.kt +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListLocationsScreenTest.kt @@ -14,8 +14,8 @@ import net.mullvad.mullvadvpn.compose.data.DUMMY_RELAY_COUNTRIES import net.mullvad.mullvadvpn.compose.setContentWithTheme import net.mullvad.mullvadvpn.compose.state.CustomListLocationsData import net.mullvad.mullvadvpn.compose.state.CustomListLocationsUiState -import net.mullvad.mullvadvpn.compose.state.RelayLocationListItem import net.mullvad.mullvadvpn.lib.model.RelayItem +import net.mullvad.mullvadvpn.lib.ui.component.relaylist.CheckableRelayListItem import net.mullvad.mullvadvpn.lib.ui.tag.CIRCULAR_PROGRESS_INDICATOR_TEST_TAG import net.mullvad.mullvadvpn.lib.ui.tag.SAVE_BUTTON_TEST_TAG import net.mullvad.mullvadvpn.util.Lce @@ -104,11 +104,11 @@ class CustomListLocationsScreenTest { CustomListLocationsData( locations = listOf( - RelayLocationListItem( + CheckableRelayListItem( DUMMY_RELAY_COUNTRIES[0], checked = true, ), - RelayLocationListItem( + CheckableRelayListItem( DUMMY_RELAY_COUNTRIES[1], checked = false, ), @@ -141,7 +141,7 @@ class CustomListLocationsScreenTest { CustomListLocationsData( locations = listOf( - RelayLocationListItem(selectedCountry, checked = true) + CheckableRelayListItem(selectedCountry, checked = true) ), searchTerm = "", saveEnabled = false, diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SearchLocationScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SearchLocationScreenTest.kt index 32a91fa61b..7e03afb18c 100644 --- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SearchLocationScreenTest.kt +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SearchLocationScreenTest.kt @@ -12,11 +12,11 @@ import io.mockk.verify import net.mullvad.mullvadvpn.compose.createEdgeToEdgeComposeExtension import net.mullvad.mullvadvpn.compose.data.DUMMY_RELAY_ITEM_CUSTOM_LISTS import net.mullvad.mullvadvpn.compose.setContentWithTheme -import net.mullvad.mullvadvpn.compose.state.RelayListItem import net.mullvad.mullvadvpn.compose.state.SearchLocationUiState import net.mullvad.mullvadvpn.lib.model.CustomListId import net.mullvad.mullvadvpn.lib.model.RelayItem import net.mullvad.mullvadvpn.lib.model.RelayItemId +import net.mullvad.mullvadvpn.lib.ui.component.relaylist.RelayListItem import net.mullvad.mullvadvpn.lib.ui.tag.SELECT_LOCATION_CUSTOM_LIST_HEADER_TEST_TAG import net.mullvad.mullvadvpn.util.Lce import org.junit.jupiter.api.AfterEach @@ -44,7 +44,6 @@ class SearchLocationScreenTest { onToggleExpand: (RelayItemId, CustomListId?, Boolean) -> Unit = { _, _, _ -> }, onSearchInputChanged: (String) -> Unit = {}, onCreateCustomList: (location: RelayItem.Location?) -> Unit = {}, - onEditCustomLists: () -> Unit = {}, onAddLocationToList: (location: RelayItem.Location, customList: RelayItem.CustomList) -> Unit = { _, _ -> @@ -67,7 +66,6 @@ class SearchLocationScreenTest { onToggleExpand = onToggleExpand, onSearchInputChanged = onSearchInputChanged, onCreateCustomList = onCreateCustomList, - onEditCustomLists = onEditCustomLists, onAddLocationToList = onAddLocationToList, onRemoveLocationFromList = onRemoveLocationFromList, onEditCustomListName = onEditCustomListName, diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationScreenTest.kt index e03786aef3..0767fc35ad 100644 --- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationScreenTest.kt +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationScreenTest.kt @@ -15,12 +15,13 @@ import net.mullvad.mullvadvpn.compose.createEdgeToEdgeComposeExtension import net.mullvad.mullvadvpn.compose.data.DUMMY_RELAY_COUNTRIES import net.mullvad.mullvadvpn.compose.data.DUMMY_RELAY_ITEM_CUSTOM_LISTS import net.mullvad.mullvadvpn.compose.setContentWithTheme -import net.mullvad.mullvadvpn.compose.state.RelayListItem import net.mullvad.mullvadvpn.compose.state.RelayListType import net.mullvad.mullvadvpn.compose.state.SelectLocationListUiState import net.mullvad.mullvadvpn.compose.state.SelectLocationUiState import net.mullvad.mullvadvpn.lib.model.CustomListId import net.mullvad.mullvadvpn.lib.model.RelayItem +import net.mullvad.mullvadvpn.lib.ui.component.relaylist.ItemPosition +import net.mullvad.mullvadvpn.lib.ui.component.relaylist.RelayListItem import net.mullvad.mullvadvpn.lib.ui.tag.SELECT_LOCATION_CUSTOM_LIST_BOTTOM_SHEET_TEST_TAG import net.mullvad.mullvadvpn.lib.ui.tag.SELECT_LOCATION_LOCATION_BOTTOM_SHEET_TEST_TAG import net.mullvad.mullvadvpn.performLongClick @@ -110,7 +111,10 @@ class SelectLocationScreenTest { SelectLocationListUiState( relayListItems = DUMMY_RELAY_COUNTRIES.map { - RelayListItem.GeoLocationItem(item = it) + RelayListItem.GeoLocationItem( + item = it, + itemPosition = ItemPosition.Single, + ) }, customLists = emptyList(), ) @@ -250,7 +254,13 @@ class SelectLocationScreenTest { MutableStateFlow( Lce.Content( SelectLocationListUiState( - relayListItems = listOf(RelayListItem.GeoLocationItem(relayItem)), + relayListItems = + listOf( + RelayListItem.GeoLocationItem( + relayItem, + itemPosition = ItemPosition.Single, + ) + ), customLists = emptyList(), ) ) @@ -278,6 +288,6 @@ class SelectLocationScreenTest { } companion object { - private const val CUSTOM_LISTS_EMPTY_TEXT = "To create a custom list press the \"︙\"" + private const val CUSTOM_LISTS_EMPTY_TEXT = "To create a custom list press the \"+\"" } } |
