summaryrefslogtreecommitdiffhomepage
path: root/android/test
diff options
context:
space:
mode:
Diffstat (limited to 'android/test')
-rw-r--r--android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/page/DeviceManagementPage.kt20
1 files changed, 20 insertions, 0 deletions
diff --git a/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/page/DeviceManagementPage.kt b/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/page/DeviceManagementPage.kt
new file mode 100644
index 0000000000..6c02993d34
--- /dev/null
+++ b/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/page/DeviceManagementPage.kt
@@ -0,0 +1,20 @@
+package net.mullvad.mullvadvpn.test.common.page
+
+import androidx.test.uiautomator.By
+import net.mullvad.mullvadvpn.test.common.extension.expectObjectToDisappearWithTimeout
+import net.mullvad.mullvadvpn.test.common.extension.findObjectWithTimeout
+
+class DeviceManagementPage internal constructor() : Page() {
+ override fun assertIsDisplayed() {
+ uiDevice.findObjectWithTimeout(By.text("Manage devices"))
+ }
+
+ fun removeDevice(deviceName: String) {
+ val secondDevice = uiDevice.findObjectWithTimeout(By.text(deviceName)).parent
+ secondDevice.findObject(By.clickable(true)).click()
+ }
+
+ fun expectDeviceToBeRemoved(deviceName: String) {
+ uiDevice.expectObjectToDisappearWithTimeout(By.text(deviceName))
+ }
+}