-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add leak test for when VPN settings change
- Loading branch information
1 parent
8de6bf8
commit 7b6a39b
Showing
16 changed files
with
218 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
.../test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/page/DaitaSettingsPage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.mullvad.mullvadvpn.test.common.page | ||
|
||
import androidx.test.uiautomator.By | ||
import net.mullvad.mullvadvpn.test.common.extension.findObjectWithTimeout | ||
import net.mullvad.mullvadvpn.test.common.page.VpnSettingsPage.Companion.SWITCH_TEST_TAG | ||
|
||
class DaitaSettingsPage internal constructor() : Page() { | ||
private val enableSelector = By.text("Enable") | ||
override fun assertIsDisplayed() { | ||
uiDevice.findObjectWithTimeout(By.res(DAITA_SCREEN_TEST_TAG)) | ||
} | ||
|
||
fun clickEnableSwitch() { | ||
val localNetworkSharingCell = | ||
uiDevice.findObjectWithTimeout(enableSelector).parent | ||
val localNetworkSharingSwitch = | ||
localNetworkSharingCell.findObjectWithTimeout(By.res(SWITCH_TEST_TAG)) | ||
|
||
localNetworkSharingSwitch.click() | ||
} | ||
|
||
companion object { | ||
const val DAITA_SCREEN_TEST_TAG = "daita_screen_test_tag" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/page/TopBar.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.