Commit 38bf8961 authored by Maxime Charland's avatar Maxime Charland Committed by Commit Bot

Chrome Empties: Fix testCachePositionIsResetWhenNodeIsPermanentAndEmpty

The testCachePositionIsResetWhenNodeIsPermanentAndEmpty test in BookmarksTestCase fails when the illustrated-empty-states flag is enabled because while the functionality remains the same, an assumption about the view's contents is different because of Chrome Empties.

The test moves into Mobile Bookmarks, closes Bookmarks, removes all the bookmarks, then reopens Bookmarks to make sure the root level of Bookmarks is opened.
While this is still true, the test checks the existence of "Mobile Bookmarks" in the TableView to see if the views is currently displaying the root level.
With Chrome Empties, the test will check the absence of a Back button, which is the case with or without Chrome Empties.

Bug: 1098328
Change-Id: I52c2c18a5b489febb0ba6e7e76be4c1577de1eac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2327230Reviewed-by: default avatarTommy Martino <tmartino@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Maxime Charland <mcharland@google.com>
Cr-Commit-Position: refs/heads/master@{#793176}
parent 4ad23a7b
......@@ -758,9 +758,17 @@ using chrome_test_util::TappableBookmarkNodeWithLabel;
// Reopen bookmarks.
[BookmarkEarlGreyUI openBookmarks];
// Ensure the root node is opened, by verifying Mobile Bookmarks is seen in a
// table cell.
[BookmarkEarlGreyUI verifyBookmarkFolderIsSeen:@"Mobile Bookmarks"];
if (base::FeatureList::IsEnabled(kIllustratedEmptyStates)) {
// Ensure the root node is opened, by verifying that there isn't a Back
// button in the navigation bar.
[[EarlGrey selectElementWithMatcher:chrome_test_util::
BookmarksNavigationBarBackButton()]
assertWithMatcher:grey_nil()];
} else {
// Ensure the root node is opened, by verifying Mobile Bookmarks is seen in
// a table cell.
[BookmarkEarlGreyUI verifyBookmarkFolderIsSeen:@"Mobile Bookmarks"];
}
}
- (void)testCachePositionIsRecreatedWhenNodeIsMoved {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment