mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-02 03:40:16 +00:00
[fenix] [UI Smoke Tests] New undoDeleteBookmarkFolderTest UI test and Improve coverage for deleteNonEmptyBookmarkFolderTest UI test (https://github.com/mozilla-mobile/fenix/pull/22587)
* New undoDeleteBookmarkFolderTest smoke UI test * Improve coverage for deleteNonEmptyBookmarkFolderTest UI smoke test Co-authored-by: AndiAJ <andiaj@users.noreply.github.com>
This commit is contained in:
parent
87203e4afb
commit
edd33f2685
@ -627,4 +627,30 @@ class BookmarksTest {
|
||||
verifyBookmarkIsDeleted("Test_Page_1")
|
||||
}
|
||||
}
|
||||
|
||||
@SmokeTest
|
||||
@Test
|
||||
fun undoDeleteBookmarkFolderTest() {
|
||||
|
||||
browserScreen {
|
||||
}.openThreeDotMenu {
|
||||
}.openBookmarks {
|
||||
bookmarksListIdlingResource =
|
||||
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 1)
|
||||
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
|
||||
createFolder("My Folder")
|
||||
verifyFolderTitle("My Folder")
|
||||
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
|
||||
}.openThreeDotMenu("My Folder") {
|
||||
}.clickDelete {
|
||||
cancelFolderDeletion()
|
||||
verifyFolderTitle("My Folder")
|
||||
}.openThreeDotMenu("My Folder") {
|
||||
}.clickDelete {
|
||||
confirmDeletion()
|
||||
verifyDeleteSnackBarText()
|
||||
clickUndoDeleteButton()
|
||||
verifyFolderTitle("My Folder")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -945,6 +945,18 @@ class SmokeTest {
|
||||
verifyFolderTitle("My Folder")
|
||||
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
|
||||
}.openThreeDotMenu("Test_Page_1") {
|
||||
}.clickEdit {
|
||||
clickParentFolderSelector()
|
||||
selectFolder("My Folder")
|
||||
navigateUp()
|
||||
saveEditBookmark()
|
||||
createFolder("My Folder 2")
|
||||
bookmarksListIdlingResource =
|
||||
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 1)
|
||||
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
|
||||
verifyFolderTitle("My Folder 2")
|
||||
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
|
||||
}.openThreeDotMenu("My Folder 2") {
|
||||
}.clickEdit {
|
||||
clickParentFolderSelector()
|
||||
selectFolder("My Folder")
|
||||
@ -958,12 +970,15 @@ class SmokeTest {
|
||||
}.clickDelete {
|
||||
confirmDeletion()
|
||||
verifyDeleteSnackBarText()
|
||||
verifyBookmarkIsDeleted("My Folder")
|
||||
verifyBookmarkIsDeleted("My Folder 2")
|
||||
verifyBookmarkIsDeleted("Test_Page_1")
|
||||
navigateUp()
|
||||
}
|
||||
|
||||
browserScreen {
|
||||
}.openThreeDotMenu {
|
||||
verifyBookmarksButton()
|
||||
verifyAddBookmarkButton()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -369,6 +369,7 @@ private fun assertBookmarkIsDeleted(expectedTitle: String) {
|
||||
assertFalse(
|
||||
mDevice.findObject(
|
||||
UiSelector()
|
||||
.resourceId("$packageName:id/title")
|
||||
.textContains(expectedTitle)
|
||||
).waitForExists(waitingTime)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user