|
|
|
@ -68,6 +68,25 @@ class BookmarksTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyEmptyBookmarksMenuTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openBookmarks {
|
|
|
|
|
bookmarksListIdlingResource =
|
|
|
|
|
RecyclerViewIdlingResource(
|
|
|
|
|
activityTestRule.activity.findViewById(R.id.bookmark_list),
|
|
|
|
|
1
|
|
|
|
|
)
|
|
|
|
|
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
|
|
|
|
|
|
|
|
|
|
verifyBookmarksMenuView()
|
|
|
|
|
verifyAddFolderButton()
|
|
|
|
|
verifyCloseButton()
|
|
|
|
|
verifyBookmarkTitle("Desktop Bookmarks")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun defaultDesktopBookmarksFoldersTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
@ -403,6 +422,38 @@ class BookmarksTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun undoDeleteMultipleSelectionTest() {
|
|
|
|
|
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
|
|
|
|
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
|
|
|
|
|
|
|
|
|
|
browserScreen {
|
|
|
|
|
createBookmark(firstWebPage.url)
|
|
|
|
|
createBookmark(secondWebPage.url)
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openBookmarks {
|
|
|
|
|
bookmarksListIdlingResource =
|
|
|
|
|
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 3)
|
|
|
|
|
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
|
|
|
|
|
|
|
|
|
|
longTapSelectItem(firstWebPage.url)
|
|
|
|
|
longTapSelectItem(secondWebPage.url)
|
|
|
|
|
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
|
|
|
|
|
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
multipleSelectionToolbar {
|
|
|
|
|
clickMultiSelectionDelete()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bookmarksMenu {
|
|
|
|
|
verifyDeleteMultipleBookmarksSnackBar()
|
|
|
|
|
clickUndoDeleteButton()
|
|
|
|
|
verifyBookmarkedURL(firstWebPage.url.toString())
|
|
|
|
|
verifyBookmarkedURL(secondWebPage.url.toString())
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun multipleSelectionShareButtonTest() {
|
|
|
|
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
|
|
|
|