Skip to content

Commit 344f138

Browse files
fix android tests - scroll down to reach next button
1 parent 07091ee commit 344f138

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

test/android/app/src/androidTest/java/io/didomi/reactnative/test/BaseUITest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ open class BaseUITest {
4141
onView(matcher).perform(ScrollToAction(), click())
4242
}
4343

44-
private fun scrollToItem(name: String) {
44+
protected fun scrollToItem(name: String) {
4545
val matcher = withText(name.uppercase())
4646
onView(matcher).perform(ScrollToAction())
4747
}

test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIMethodsTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ class UIMethodsTest : BaseUITest() {
101101

102102
@Test
103103
fun test_HidePreferences() {
104+
scrollToItem("showPreferences Purposes") // Scroll to the next item to be able to check button's status
104105
testMethodCall("hidePreferences")
106+
testLastEvent("on_hide_preferences")
105107
}
106108

107109
@Test

0 commit comments

Comments
 (0)