Skip to content

Commit

Permalink
tests: Use UiSelector to attempt to resolve test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
devinbileck committed Jan 10, 2025
1 parent 13cb0fb commit 75a9f4c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 75a9f4c

Please sign in to comment.