mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/17309, https://github.com/mozilla-mobile/fenix/issues/13447, https://github.com/mozilla-mobile/fenix/issues/14534 UI tests: changed the way page Url is verified
This commit is contained in:
parent
2f57dcfdac
commit
3f211fe90b
@ -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())
|
||||||
}
|
}
|
||||||
|
@ -120,6 +120,7 @@ class SettingsBasicsTest {
|
|||||||
|
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
}.enterURLAndEnterToBrowser(page2.url) {
|
}.enterURLAndEnterToBrowser(page2.url) {
|
||||||
|
verifyUrl(page2.url.toString())
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
clickAddBookmarkButton()
|
clickAddBookmarkButton()
|
||||||
}
|
}
|
||||||
|
@ -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()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user