For #12895 Fix Intermittent test navigateBookmarksFoldersTest
This commit is contained in:
parent
c488bb0e11
commit
a4a2a59b7d
|
@ -494,12 +494,16 @@ class BookmarksTest {
|
|||
}.openBookmarks {
|
||||
createFolder("1")
|
||||
getInstrumentation().waitForIdleSync()
|
||||
waitForBookmarksFolderContentToExist("Bookmarks", "1")
|
||||
selectFolder("1")
|
||||
verifyCurrentFolderTitle("1")
|
||||
createFolder("2")
|
||||
getInstrumentation().waitForIdleSync()
|
||||
waitForBookmarksFolderContentToExist("1", "2")
|
||||
selectFolder("2")
|
||||
verifyCurrentFolderTitle("2")
|
||||
navigateUp()
|
||||
waitForBookmarksFolderContentToExist("1", "2")
|
||||
verifyCurrentFolderTitle("1")
|
||||
mDevice.pressBack()
|
||||
verifyBookmarksMenuView()
|
||||
|
|
|
@ -105,6 +105,10 @@ class BookmarksRobot {
|
|||
fun verifySelectDefaultFolderSnackBarText() = assertSnackBarText("Can’t edit default folders")
|
||||
|
||||
fun verifyCurrentFolderTitle(title: String) {
|
||||
mDevice.findObject(UiSelector().resourceId("$packageName:id/navigationToolbar")
|
||||
.textContains(title))
|
||||
.waitForExists(waitingTime)
|
||||
|
||||
onView(
|
||||
allOf(
|
||||
withText(title),
|
||||
|
@ -114,6 +118,14 @@ class BookmarksRobot {
|
|||
.check(matches(isDisplayed()))
|
||||
}
|
||||
|
||||
fun waitForBookmarksFolderContentToExist(parentFolderName: String, childFolderName: String) {
|
||||
mDevice.findObject(UiSelector().resourceId("$packageName:id/navigationToolbar")
|
||||
.textContains(parentFolderName))
|
||||
.waitForExists(waitingTime)
|
||||
|
||||
mDevice.waitNotNull(Until.findObject(By.text(childFolderName)), waitingTime)
|
||||
}
|
||||
|
||||
fun verifySignInToSyncButton() =
|
||||
signInToSyncButton().check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user