summaryrefslogtreecommitdiffhomepage
path: root/android/app/src/androidTest
diff options
context:
space:
mode:
Diffstat (limited to 'android/app/src/androidTest')
-rw-r--r--android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreenTest.kt17
1 files changed, 11 insertions, 6 deletions
diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreenTest.kt
index 0cdc8b8fe7..f1a81d4d91 100644
--- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreenTest.kt
+++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreenTest.kt
@@ -10,6 +10,9 @@ import io.mockk.every
import io.mockk.mockk
import io.mockk.unmockkAll
import io.mockk.verify
+import java.time.Duration
+import java.time.Instant
+import java.time.ZonedDateTime
import net.mullvad.mullvadvpn.compose.createEdgeToEdgeComposeExtension
import net.mullvad.mullvadvpn.compose.setContentWithTheme
import net.mullvad.mullvadvpn.compose.state.ConnectUiState
@@ -30,8 +33,6 @@ import net.mullvad.mullvadvpn.lib.model.TunnelEndpoint
import net.mullvad.mullvadvpn.lib.model.TunnelState
import net.mullvad.mullvadvpn.repository.InAppNotification
import net.mullvad.mullvadvpn.ui.VersionInfo
-import org.joda.time.DateTime
-import org.joda.time.Duration
import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
@@ -556,7 +557,7 @@ class ConnectScreenTest {
fun testAccountExpiredNotification() {
composeExtension.use {
// Arrange
- val expiryDate = DateTime(2020, 11, 11, 10, 10)
+ val expiryDate = ZonedDateTime.parse("2020-11-11T10:10Z")
initScreen(
state =
ConnectUiState(
@@ -567,7 +568,9 @@ class ConnectScreenTest {
deviceName = "",
daysLeftUntilExpiry = null,
inAppNotification =
- InAppNotification.AccountExpiry(Duration(DateTime.now(), expiryDate)),
+ InAppNotification.AccountExpiry(
+ Duration.between(Instant.now(), expiryDate)
+ ),
isPlayBuild = false,
)
)
@@ -612,7 +615,7 @@ class ConnectScreenTest {
composeExtension.use {
// Arrange
val mockedClickHandler: () -> Unit = mockk(relaxed = true)
- val expiryDate = DateTime(2020, 11, 11, 10, 10)
+ val expiryDate = ZonedDateTime.parse("2020-11-11T10:10Z")
initScreen(
onManageAccountClick = mockedClickHandler,
state =
@@ -624,7 +627,9 @@ class ConnectScreenTest {
deviceName = "",
daysLeftUntilExpiry = null,
inAppNotification =
- InAppNotification.AccountExpiry(Duration(DateTime.now(), expiryDate)),
+ InAppNotification.AccountExpiry(
+ Duration.between(Instant.now(), expiryDate)
+ ),
isPlayBuild = false,
),
)