From 75a9f4ca78562ef34f0ba8d4b0c74f4a4a66fff3 Mon Sep 17 00:00:00 2001 From: Devin Bileck <603793+devinbileck@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:14:47 -0800 Subject: [PATCH] tests: Use UiSelector to attempt to resolve test failure --- .../androidTest/java/bisq/android/tests/NotificationTest.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/androidTest/java/bisq/android/tests/NotificationTest.kt b/app/src/androidTest/java/bisq/android/tests/NotificationTest.kt index 83cc611..8458b79 100644 --- a/app/src/androidTest/java/bisq/android/tests/NotificationTest.kt +++ b/app/src/androidTest/java/bisq/android/tests/NotificationTest.kt @@ -28,7 +28,9 @@ import androidx.test.rule.GrantPermissionRule import androidx.test.uiautomator.By import androidx.test.uiautomator.BySelector import androidx.test.uiautomator.UiDevice +import androidx.test.uiautomator.UiObject import androidx.test.uiautomator.UiObject2 +import androidx.test.uiautomator.UiSelector import androidx.test.uiautomator.Until import bisq.android.database.BisqNotification import bisq.android.model.Device @@ -145,7 +147,7 @@ class NotificationTest { val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) device.openNotification() device.wait(Until.hasObject(By.text("Bisq")), WAIT_CONDITION_TIMEOUT_MS) - val title: UiObject2 = device.getObject(By.text(bisqNotification.title!!)) + val title: UiObject = device.findObject(UiSelector().text(bisqNotification.title!!)) title.click()