summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2023-10-02 18:53:24 +0200
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2023-10-02 18:53:24 +0200
commitde70dee827fdc7b901e6badc84b451d1a5811c12 (patch)
tree93032b375884f7dc6cc72e759ab170d9f4ae83a4 /android
parentbb3737bd8fa8daadac80de9b77efc38b9a1772ca (diff)
parentdad3c47378b81897869a0181e9ac76a06ee09e0a (diff)
downloadmullvadvpn-de70dee827fdc7b901e6badc84b451d1a5811c12.tar.xz
mullvadvpn-de70dee827fdc7b901e6badc84b451d1a5811c12.zip
Merge branch 'fix-show-relay-list-state-selected-test'
Diffstat (limited to 'android')
-rw-r--r--android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreenTest.kt23
1 files changed, 13 insertions, 10 deletions
diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreenTest.kt
index 106d960d1f..dd767b0c7a 100644
--- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreenTest.kt
+++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreenTest.kt
@@ -75,22 +75,25 @@ class SelectLocationScreenTest {
@Test
fun testShowRelayListStateSelected() {
+ val updatedDummyList =
+ DUMMY_RELAY_COUNTRIES.let {
+ val cities = it[0].cities.toMutableList()
+ val city = cities.removeAt(0)
+ cities.add(0, city.copy(expanded = true))
+
+ val mutableRelayList = it.toMutableList()
+ mutableRelayList[0] = it[0].copy(expanded = true, cities = cities.toList())
+ mutableRelayList
+ }
+
// Arrange
composeTestRule.setContent {
AppTheme {
SelectLocationScreen(
uiState =
SelectLocationUiState.ShowData(
- countries =
- DUMMY_RELAY_COUNTRIES.let {
- val cities = it[0].cities.toMutableList()
- val city = cities.removeAt(0)
- cities.add(0, city.copy(expanded = true))
- it.toMutableList()[0] =
- it[0].copy(expanded = true, cities = cities.toList())
- it
- },
- selectedRelay = DUMMY_RELAY_COUNTRIES[0].cities[0].relays[0]
+ countries = updatedDummyList,
+ selectedRelay = updatedDummyList[0].cities[0].relays[0]
),
uiCloseAction = MutableSharedFlow(),
enterTransitionEndAction = MutableSharedFlow<Unit>().asSharedFlow()