|
|
|
@ -13,9 +13,9 @@ import androidx.test.espresso.matcher.ViewMatchers
|
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
|
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.withId
|
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.withText
|
|
|
|
|
import androidx.test.uiautomator.UiDevice
|
|
|
|
|
import androidx.test.platform.app.InstrumentationRegistry
|
|
|
|
|
import androidx.test.uiautomator.By
|
|
|
|
|
import androidx.test.uiautomator.UiDevice
|
|
|
|
|
import androidx.test.uiautomator.Until
|
|
|
|
|
import org.hamcrest.CoreMatchers.allOf
|
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
@ -44,13 +44,6 @@ class LibraryRobot {
|
|
|
|
|
return BrowserRobot.Transition()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun closeMenu(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition {
|
|
|
|
|
closeButton().click()
|
|
|
|
|
|
|
|
|
|
BrowserRobot().interact()
|
|
|
|
|
return BrowserRobot.Transition()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun openBookmarks(interact: BookmarksRobot.() -> Unit): BookmarksRobot.Transition {
|
|
|
|
|
mDevice.waitNotNull(Until.findObject(By.text("Bookmarks")), TestAssetHelper.waitingTime)
|
|
|
|
|
bookmarksButton().click()
|
|
|
|
@ -70,7 +63,6 @@ class LibraryRobot {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun goBackButton() = onView(allOf(withContentDescription("Navigate up")))
|
|
|
|
|
private fun closeButton() = onView(withId(R.id.libraryClose))
|
|
|
|
|
private fun bookmarksButton() = onView(allOf(withText("Bookmarks")))
|
|
|
|
|
private fun historyButton() = onView(allOf(withText("History")))
|
|
|
|
|
|
|
|
|
|