2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-17 15:26:23 +00:00
Oana Horvath 2021-01-20 17:43:50 +02:00
parent 2f57dcfdac
commit 3f211fe90b
3 changed files with 12 additions and 9 deletions

View File

@ -58,9 +58,9 @@ class NavigationToolbarTest {
mDevice.waitForIdle() mDevice.waitForIdle()
}.openNavigationToolbar { }.openNavigationToolbar {
}.enterURLAndEnterToBrowser(nextWebPage.url) { }.enterURLAndEnterToBrowser(nextWebPage.url) {
mDevice.waitForIdle()
verifyUrl(nextWebPage.url.toString()) verifyUrl(nextWebPage.url.toString())
mDevice.pressBack() }.openThreeDotMenu {
}.goBack {
mDevice.waitForIdle() mDevice.waitForIdle()
verifyUrl(defaultWebPage.url.toString()) verifyUrl(defaultWebPage.url.toString())
} }

View File

@ -120,6 +120,7 @@ class SettingsBasicsTest {
navigationToolbar { navigationToolbar {
}.enterURLAndEnterToBrowser(page2.url) { }.enterURLAndEnterToBrowser(page2.url) {
verifyUrl(page2.url.toString())
}.openThreeDotMenu { }.openThreeDotMenu {
clickAddBookmarkButton() clickAddBookmarkButton()
} }

View File

@ -57,14 +57,14 @@ class BrowserRobot {
val mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) val mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
sessionLoadedIdlingResource = SessionLoadedIdlingResource() sessionLoadedIdlingResource = SessionLoadedIdlingResource()
mDevice.waitNotNull(
Until.findObject(By.res("$packageName:id/mozac_browser_toolbar_url_view")),
waitingTime
)
runWithIdleRes(sessionLoadedIdlingResource) { runWithIdleRes(sessionLoadedIdlingResource) {
onView(withId(R.id.mozac_browser_toolbar_url_view)) assertTrue(
.check(matches(withText(containsString(url.replace("http://", ""))))) mDevice.findObject(
UiSelector()
.resourceId("$packageName:id/mozac_browser_toolbar_url_view")
.textContains(url.replace("http://", ""))
).waitForExists(waitingTime)
)
} }
} }
@ -297,6 +297,8 @@ class BrowserRobot {
fun createBookmark(url: Uri) { fun createBookmark(url: Uri) {
navigationToolbar { navigationToolbar {
}.enterURLAndEnterToBrowser(url) { }.enterURLAndEnterToBrowser(url) {
// needs to wait for the right url to load before saving a bookmark
verifyUrl(url.toString())
}.openThreeDotMenu { }.openThreeDotMenu {
clickAddBookmarkButton() clickAddBookmarkButton()
} }