diff options
| author | David Göransson <david.goransson90@gmail.com> | 2023-10-10 15:56:48 +0200 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2023-10-13 11:03:58 +0200 |
| commit | e72415c31be76c019ec135ccb231560454675e7e (patch) | |
| tree | d5bac59e0f8a4daf7b5db9c4d51ee9714aa54405 /android/app/src/androidTest | |
| parent | c07ad9f01246937018ad4ae8021afa208641bfa1 (diff) | |
| download | mullvadvpn-e72415c31be76c019ec135ccb231560454675e7e.tar.xz mullvadvpn-e72415c31be76c019ec135ccb231560454675e7e.zip | |
Fix tests
Diffstat (limited to 'android/app/src/androidTest')
2 files changed, 54 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 02a148b22d..68cfa2b92c 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 @@ -83,6 +83,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowTunnelStateNotificationBlocked ), @@ -118,6 +120,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowTunnelStateNotificationBlocked ), @@ -151,6 +155,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow() @@ -182,6 +188,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow() @@ -214,6 +222,8 @@ class ConnectScreenTest { outAddress = "", showLocation = true, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow() @@ -246,6 +256,8 @@ class ConnectScreenTest { outAddress = "", showLocation = true, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow() @@ -280,6 +292,8 @@ class ConnectScreenTest { outAddress = "", showLocation = true, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowTunnelStateNotificationError( ErrorState(ErrorStateCause.StartTunnelError, true) @@ -318,6 +332,8 @@ class ConnectScreenTest { outAddress = "", showLocation = true, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowTunnelStateNotificationError( ErrorState(ErrorStateCause.StartTunnelError, false) @@ -353,6 +369,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowTunnelStateNotificationBlocked ), @@ -388,6 +406,8 @@ class ConnectScreenTest { outAddress = "", showLocation = true, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowTunnelStateNotificationBlocked ), @@ -423,6 +443,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow(), @@ -454,6 +476,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow(), @@ -485,6 +509,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow(), @@ -515,6 +541,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow(), @@ -545,6 +573,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow(), @@ -576,6 +606,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow(), @@ -614,6 +646,8 @@ class ConnectScreenTest { outAddress = mockOutAddress, showLocation = false, isTunnelInfoExpanded = true, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.HideNotification ), uiSideEffect = MutableSharedFlow<ConnectViewModel.UiSideEffect>().asSharedFlow() @@ -651,6 +685,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowVersionInfoNotification(versionInfo) ), @@ -687,6 +723,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowVersionInfoNotification(versionInfo) ), @@ -720,6 +758,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = null, + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowAccountExpiryNotification(expiryDate) ), @@ -758,6 +798,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowVersionInfoNotification(versionInfo) ), @@ -790,6 +832,8 @@ class ConnectScreenTest { outAddress = "", showLocation = false, isTunnelInfoExpanded = false, + deviceName = "", + daysLeftUntilExpiry = null, connectNotificationState = ConnectNotificationState.ShowAccountExpiryNotification(expiryDate) ), diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/OutOfTimeScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/OutOfTimeScreenTest.kt index a177aa8ac1..95b44f8286 100644 --- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/OutOfTimeScreenTest.kt +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/OutOfTimeScreenTest.kt @@ -29,7 +29,7 @@ class OutOfTimeScreenTest { composeTestRule.setContent { OutOfTimeScreen( showSitePayment = false, - uiState = OutOfTimeUiState(), + uiState = OutOfTimeUiState(deviceName = ""), uiSideEffect = MutableSharedFlow(), onSitePaymentClick = {}, onRedeemVoucherClick = {}, @@ -57,7 +57,7 @@ class OutOfTimeScreenTest { composeTestRule.setContent { OutOfTimeScreen( showSitePayment = true, - uiState = OutOfTimeUiState(), + uiState = OutOfTimeUiState(deviceName = ""), uiSideEffect = MutableStateFlow(OutOfTimeViewModel.UiSideEffect.OpenAccountView("222")), onSitePaymentClick = {}, @@ -80,7 +80,7 @@ class OutOfTimeScreenTest { composeTestRule.setContent { OutOfTimeScreen( showSitePayment = true, - uiState = OutOfTimeUiState(), + uiState = OutOfTimeUiState(deviceName = ""), uiSideEffect = MutableStateFlow(OutOfTimeViewModel.UiSideEffect.OpenConnectScreen), onSitePaymentClick = {}, onRedeemVoucherClick = {}, @@ -102,7 +102,7 @@ class OutOfTimeScreenTest { composeTestRule.setContent { OutOfTimeScreen( showSitePayment = true, - uiState = OutOfTimeUiState(), + uiState = OutOfTimeUiState(deviceName = ""), uiSideEffect = MutableSharedFlow(), onSitePaymentClick = mockClickListener, onRedeemVoucherClick = {}, @@ -127,7 +127,7 @@ class OutOfTimeScreenTest { composeTestRule.setContent { OutOfTimeScreen( showSitePayment = true, - uiState = OutOfTimeUiState(), + uiState = OutOfTimeUiState(deviceName = ""), uiSideEffect = MutableSharedFlow(), onSitePaymentClick = {}, onRedeemVoucherClick = mockClickListener, @@ -152,7 +152,11 @@ class OutOfTimeScreenTest { composeTestRule.setContent { OutOfTimeScreen( showSitePayment = true, - uiState = OutOfTimeUiState(tunnelState = TunnelState.Connecting(null, null)), + uiState = + OutOfTimeUiState( + tunnelState = TunnelState.Connecting(null, null), + deviceName = "" + ), uiSideEffect = MutableSharedFlow(), onSitePaymentClick = {}, onRedeemVoucherClick = {}, |
