summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-09-24 09:29:57 +0200
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-09-25 10:38:40 +0200
commitdd5918b22127bc0cd735de18676e281a385d34f5 (patch)
tree2d9c330f9b988b3bcab51985396c392c89408e09
parent4e0bf7ffdc30547b08bfd1a0765e7be78439cc0c (diff)
downloadmullvadvpn-dd5918b22127bc0cd735de18676e281a385d34f5.tar.xz
mullvadvpn-dd5918b22127bc0cd735de18676e281a385d34f5.zip
Fix screen tests missing assertions
-rw-r--r--android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessListScreenTest.kt6
-rw-r--r--android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessMethodDetailsScreenTest.kt2
-rw-r--r--android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/EditCustomListScreenTest.kt4
-rw-r--r--android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationScreenTest.kt4
4 files changed, 8 insertions, 8 deletions
diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessListScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessListScreenTest.kt
index 55922ff008..7225143ef9 100644
--- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessListScreenTest.kt
+++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessListScreenTest.kt
@@ -48,7 +48,7 @@ class ApiAccessListScreenTest {
)
// Assert
- onNodeWithText("Current: ${currentApiAccessMethod.name}")
+ onNodeWithText("Current: ${currentApiAccessMethod.name}").assertExists()
}
@Test
@@ -61,8 +61,8 @@ class ApiAccessListScreenTest {
)
// Assert
- onNodeWithText(apiAccessMethod.name.value)
- onNodeWithText("On")
+ onNodeWithText(apiAccessMethod.name.value).assertExists()
+ onNodeWithText("On").assertExists()
}
@Test
diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessMethodDetailsScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessMethodDetailsScreenTest.kt
index 8c3975bed5..15ee5a841d 100644
--- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessMethodDetailsScreenTest.kt
+++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ApiAccessMethodDetailsScreenTest.kt
@@ -89,7 +89,7 @@ class ApiAccessMethodDetailsScreenTest {
onNodeWithText("Enable method").performClick()
// Assert
- onNodeWithText("At least one method needs to be enabled")
+ onNodeWithText("At least one method needs to be enabled").assertExists()
verify(exactly = 0) { onEnableClicked(any()) }
}
diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/EditCustomListScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/EditCustomListScreenTest.kt
index 971a7f5459..a2cd982149 100644
--- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/EditCustomListScreenTest.kt
+++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/EditCustomListScreenTest.kt
@@ -84,7 +84,7 @@ class EditCustomListScreenTest {
)
// Assert
- onNodeWithText(customList.name.value)
+ onNodeWithText(customList.name.value).assertExists()
}
@Test
@@ -102,7 +102,7 @@ class EditCustomListScreenTest {
)
// Assert
- onNodeWithText(LOCATIONS_TEXT.format(customList.locations.size))
+ onNodeWithText(LOCATIONS_TEXT.format(customList.locations.size)).assertExists()
}
@Test
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 5fdf9c047c..09a0fa9be3 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
@@ -293,7 +293,7 @@ class SelectLocationScreenTest {
onNodeWithText(customList.relay.name).performLongClick()
// Assert
- onNodeWithTag(SELECT_LOCATION_CUSTOM_LIST_BOTTOM_SHEET_TEST_TAG)
+ onNodeWithTag(SELECT_LOCATION_CUSTOM_LIST_BOTTOM_SHEET_TEST_TAG).assertExists()
}
@Test
@@ -337,7 +337,7 @@ class SelectLocationScreenTest {
onNodeWithText(relayItem.relay.name).performLongClick()
// Assert
- onNodeWithTag(SELECT_LOCATION_LOCATION_BOTTOM_SHEET_TEST_TAG)
+ onNodeWithTag(SELECT_LOCATION_LOCATION_BOTTOM_SHEET_TEST_TAG).assertExists()
}
companion object {