summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt52
1 files changed, 27 insertions, 25 deletions
diff --git a/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt b/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt
index 83b04ee04c..d049525324 100644
--- a/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt
+++ b/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt
@@ -1,6 +1,7 @@
package net.mullvad.mullvadvpn.test.e2e
import kotlin.time.Duration.Companion.milliseconds
+import kotlin.time.Duration.Companion.minutes
import kotlinx.coroutines.delay
import kotlinx.coroutines.test.runTest
import net.mullvad.mullvadvpn.test.common.constant.EXTREMELY_LONG_TIMEOUT
@@ -103,39 +104,40 @@ class ConnectionTest : EndToEndTest() {
@Test
@HasDependencyOnLocalAPI
@ClearFirewallRules
- fun testWireGuardObfuscationAutomatic() = runTest {
- app.launchAndLogIn(accountTestRule.validAccountNumber)
- on<ConnectPage> { enableLocalNetworkSharingStory() }
+ fun testWireGuardObfuscationAutomatic() =
+ runTest(timeout = 2.minutes) {
+ app.launchAndLogIn(accountTestRule.validAccountNumber)
+ on<ConnectPage> { enableLocalNetworkSharingStory() }
- on<ConnectPage> { clickSelectLocation() }
+ on<ConnectPage> { clickSelectLocation() }
- on<SelectLocationPage> {
- clickLocationExpandButton(relayProvider.getDefaultRelay().country)
- clickLocationExpandButton(relayProvider.getDefaultRelay().city)
- clickLocationCell(relayProvider.getDefaultRelay().relay)
- }
+ on<SelectLocationPage> {
+ clickLocationExpandButton(relayProvider.getDefaultRelay().country)
+ clickLocationExpandButton(relayProvider.getDefaultRelay().city)
+ clickLocationCell(relayProvider.getDefaultRelay().relay)
+ }
- device.acceptVpnPermissionDialog()
+ device.acceptVpnPermissionDialog()
- var relayIpAddress: String? = null
+ var relayIpAddress: String? = null
- on<ConnectPage> {
- waitForConnectedLabel()
- relayIpAddress = extractInIpv4Address()
- clickDisconnect()
- }
+ on<ConnectPage> {
+ waitForConnectedLabel()
+ relayIpAddress = extractInIpv4Address()
+ clickDisconnect()
+ }
- // Block UDP traffic to the relay
- val firewallRule = DropRule.blockUDPTrafficRule(relayIpAddress!!)
- firewallClient.createRule(firewallRule)
+ // Block UDP traffic to the relay
+ val firewallRule = DropRule.blockUDPTrafficRule(relayIpAddress!!)
+ firewallClient.createRule(firewallRule)
- on<ConnectPage> {
- clickConnect()
- // Currently it takes ~45 seconds to connect with wg obfuscation automatic and UDP
- // traffic blocked so we need to be very forgiving
- waitForConnectedLabel(timeout = VERY_FORGIVING_WIREGUARD_OFF_CONNECTION_TIMEOUT)
+ on<ConnectPage> {
+ clickConnect()
+ // Currently it takes ~45 seconds to connect with wg obfuscation automatic and UDP
+ // traffic blocked so we need to be very forgiving
+ waitForConnectedLabel(timeout = VERY_FORGIVING_WIREGUARD_OFF_CONNECTION_TIMEOUT)
+ }
}
- }
@Test
@HasDependencyOnLocalAPI