mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
[fenix] Closes 9291: Fix shortcutSearchEngineSettingsTest (https://github.com/mozilla-mobile/fenix/pull/9292)
This commit is contained in:
parent
3f11241a54
commit
df36b981bb
@ -61,7 +61,6 @@ class SearchTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Temp disable flakey test - see: https://github.com/mozilla-mobile/fenix/issues/5462")
|
||||
fun shortcutSearchEngineSettingsTest() {
|
||||
homeScreen {
|
||||
}.openSearch {
|
||||
|
@ -9,7 +9,9 @@ package org.mozilla.fenix.ui.robots
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.test.espresso.Espresso.onView
|
||||
import androidx.test.espresso.ViewInteraction
|
||||
import androidx.test.espresso.action.ViewActions
|
||||
import androidx.test.espresso.action.ViewActions.click
|
||||
import androidx.test.espresso.action.ViewActions.closeSoftKeyboard
|
||||
import androidx.test.espresso.action.ViewActions.typeText
|
||||
import androidx.test.espresso.assertion.ViewAssertions.matches
|
||||
import androidx.test.espresso.contrib.RecyclerViewActions
|
||||
@ -21,7 +23,6 @@ import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.uiautomator.By
|
||||
import androidx.test.uiautomator.UiDevice
|
||||
import androidx.test.uiautomator.UiObject
|
||||
import androidx.test.uiautomator.UiScrollable
|
||||
import androidx.test.uiautomator.UiSelector
|
||||
import androidx.test.uiautomator.Until
|
||||
import org.hamcrest.CoreMatchers.allOf
|
||||
@ -79,10 +80,12 @@ class SearchRobot {
|
||||
)
|
||||
}
|
||||
|
||||
fun scrollToSearchEngineSettings(): UiScrollable {
|
||||
val appView = UiScrollable(UiSelector().scrollable(true))
|
||||
appView.scrollTextIntoView("Search engine settings")
|
||||
return appView
|
||||
fun scrollToSearchEngineSettings() {
|
||||
// Soft keyboard is visible on screen on view access; hide it
|
||||
onView(allOf(withId(R.id.search_layout))).perform(
|
||||
closeSoftKeyboard()
|
||||
)
|
||||
onView(allOf(withId(R.id.awesomeBar))).perform(ViewActions.swipeUp())
|
||||
}
|
||||
|
||||
fun clickSearchEngineSettings() {
|
||||
|
Loading…
Reference in New Issue
Block a user