Commit 470f3d26 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

Revert "Reland "[Empties] Enable the IllustratedEmptyStates field trial testing config.""

This reverts commit d777f5d0.

Reason for revert: Lots of test failures here:
https://ci.chromium.org/p/chrome/builders/ci/iphone-simulator/14202

Original change's description:
> Reland "[Empties] Enable the IllustratedEmptyStates field trial testing config."
> 
> This is a reland of 74b8ec6f
> 
> Original change's description:
> > [Empties] Enable the IllustratedEmptyStates field trial testing config.
> > 
> > Change-Id: I664fa63b5b69369cb69fb4b87463ba3bb4cfc94d
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2386295
> > Reviewed-by: Sergio Collazos <sczs@chromium.org>
> > Reviewed-by: Steven Holte <holte@chromium.org>
> > Commit-Queue: sebsg <sebsg@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#805136}
> 
> Change-Id: Ieb3e461efb4c55e7ef601417819cc4470e8fe4cc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401398
> Commit-Queue: sebsg <sebsg@chromium.org>
> Reviewed-by: Sergio Collazos <sczs@chromium.org>
> Reviewed-by: Ilya Sherman <isherman@chromium.org>
> Auto-Submit: sebsg <sebsg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#807867}

TBR=isherman@chromium.org,sebsg@chromium.org,sczs@chromium.org

Change-Id: I69b15363426ecabb9712f182e617166d148566e6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2416874Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807935}
parent f0d50ca1
...@@ -152,15 +152,11 @@ using chrome_test_util::SignOutAccountsButton; ...@@ -152,15 +152,11 @@ using chrome_test_util::SignOutAccountsButton;
+ (void)verifySigninPromoVisibleWithMode:(SigninPromoViewMode)mode + (void)verifySigninPromoVisibleWithMode:(SigninPromoViewMode)mode
closeButton:(BOOL)closeButton { closeButton:(BOOL)closeButton {
[ChromeEarlGreyUI waitForAppToIdle]; [ChromeEarlGreyUI waitForAppToIdle];
// The sign-in promo is not visible when showing illustrated empty states.
if (![ChromeEarlGrey isIllustratedEmptyStatesEnabled]) {
[[EarlGrey [[EarlGrey
selectElementWithMatcher:grey_allOf( selectElementWithMatcher:grey_allOf(
grey_accessibilityID(kSigninPromoViewId), grey_accessibilityID(kSigninPromoViewId),
grey_sufficientlyVisible(), nil)] grey_sufficientlyVisible(), nil)]
assertWithMatcher:grey_notNil()]; assertWithMatcher:grey_notNil()];
}
[[EarlGrey [[EarlGrey
selectElementWithMatcher:grey_allOf(PrimarySignInButton(), selectElementWithMatcher:grey_allOf(PrimarySignInButton(),
grey_sufficientlyVisible(), nil)] grey_sufficientlyVisible(), nil)]
...@@ -173,13 +169,10 @@ using chrome_test_util::SignOutAccountsButton; ...@@ -173,13 +169,10 @@ using chrome_test_util::SignOutAccountsButton;
assertWithMatcher:grey_nil()]; assertWithMatcher:grey_nil()];
break; break;
case SigninPromoViewModeWarmState: case SigninPromoViewModeWarmState:
if (![ChromeEarlGrey isIllustratedEmptyStatesEnabled]) {
[[EarlGrey [[EarlGrey
selectElementWithMatcher:grey_allOf(SecondarySignInButton(), selectElementWithMatcher:grey_allOf(SecondarySignInButton(),
grey_sufficientlyVisible(), grey_sufficientlyVisible(), nil)]
nil)]
assertWithMatcher:grey_notNil()]; assertWithMatcher:grey_notNil()];
}
break; break;
} }
if (closeButton) { if (closeButton) {
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#import "ios/chrome/browser/ui/bookmarks/bookmark_earl_grey_ui.h" #import "ios/chrome/browser/ui/bookmarks/bookmark_earl_grey_ui.h"
#include "base/ios/ios_util.h"
#include "base/mac/foundation_util.h" #include "base/mac/foundation_util.h"
#import "base/test/ios/wait_util.h" #import "base/test/ios/wait_util.h"
#include "build/build_config.h" #include "build/build_config.h"
...@@ -362,19 +361,12 @@ id<GREYMatcher> SearchIconButton() { ...@@ -362,19 +361,12 @@ id<GREYMatcher> SearchIconButton() {
} }
- (void)verifyEmptyBackgroundAppears { - (void)verifyEmptyBackgroundAppears {
if ([ChromeEarlGrey isIllustratedEmptyStatesEnabled]) { id<GREYMatcher> emptyBackground =
[[EarlGrey selectElementWithMatcher:grey_accessibilityID( grey_accessibilityID([ChromeEarlGrey isIllustratedEmptyStatesEnabled]
kTableViewIllustratedEmptyViewID)] ? kTableViewIllustratedEmptyViewID
assertWithMatcher:grey_notNil()]; : kBookmarkEmptyStateExplanatoryLabelIdentifier);
[[EarlGrey selectElementWithMatcher:grey_text(l10n_util::GetNSString( [[EarlGrey selectElementWithMatcher:emptyBackground]
IDS_IOS_BOOKMARK_EMPTY_MESSAGE))]
assertWithMatcher:grey_sufficientlyVisible()];
} else {
[[EarlGrey
selectElementWithMatcher:
grey_accessibilityID(kBookmarkEmptyStateExplanatoryLabelIdentifier)]
assertWithMatcher:grey_sufficientlyVisible()]; assertWithMatcher:grey_sufficientlyVisible()];
}
} }
- (void)verifyEmptyState { - (void)verifyEmptyState {
...@@ -383,10 +375,10 @@ id<GREYMatcher> SearchIconButton() { ...@@ -383,10 +375,10 @@ id<GREYMatcher> SearchIconButton() {
id<GREYInteraction> searchBar = id<GREYInteraction> searchBar =
[EarlGrey selectElementWithMatcher:grey_accessibilityTrait( [EarlGrey selectElementWithMatcher:grey_accessibilityTrait(
UIAccessibilityTraitSearchField)]; UIAccessibilityTraitSearchField)];
// TODO(crbug.com/1126982): Fix the search bar issue on iOS 12.4. if ([ChromeEarlGrey isIllustratedEmptyStatesEnabled]) {
// The search bar should not be visible when the illustrated empty state is // With the illustrated empty state, the search bar should be hidden.
// shown. [searchBar assertWithMatcher:grey_nil()];
if (![ChromeEarlGrey isIllustratedEmptyStatesEnabled]) { } else {
[searchBar assertWithMatcher:grey_notNil()]; [searchBar assertWithMatcher:grey_notNil()];
} }
} }
......
...@@ -759,7 +759,7 @@ using chrome_test_util::TappableBookmarkNodeWithLabel; ...@@ -759,7 +759,7 @@ using chrome_test_util::TappableBookmarkNodeWithLabel;
// Reopen bookmarks. // Reopen bookmarks.
[BookmarkEarlGreyUI openBookmarks]; [BookmarkEarlGreyUI openBookmarks];
if ([ChromeEarlGrey isIllustratedEmptyStatesEnabled]) { if (base::FeatureList::IsEnabled(kIllustratedEmptyStates)) {
// Ensure the root node is opened, by verifying that there isn't a Back // Ensure the root node is opened, by verifying that there isn't a Back
// button in the navigation bar. // button in the navigation bar.
[[EarlGrey selectElementWithMatcher:chrome_test_util:: [[EarlGrey selectElementWithMatcher:chrome_test_util::
...@@ -866,7 +866,7 @@ using chrome_test_util::TappableBookmarkNodeWithLabel; ...@@ -866,7 +866,7 @@ using chrome_test_util::TappableBookmarkNodeWithLabel;
- (void)testRootEmptyState { - (void)testRootEmptyState {
[BookmarkEarlGreyUI openBookmarks]; [BookmarkEarlGreyUI openBookmarks];
if ([ChromeEarlGrey isIllustratedEmptyStatesEnabled]) { if (base::FeatureList::IsEnabled(kIllustratedEmptyStates)) {
// When the user has no bookmarks, the root view should be an empty state. // When the user has no bookmarks, the root view should be an empty state.
[BookmarkEarlGreyUI verifyEmptyState]; [BookmarkEarlGreyUI verifyEmptyState];
} else { } else {
...@@ -894,7 +894,7 @@ using chrome_test_util::TappableBookmarkNodeWithLabel; ...@@ -894,7 +894,7 @@ using chrome_test_util::TappableBookmarkNodeWithLabel;
BookmarksNavigationBarBackButton()] BookmarksNavigationBarBackButton()]
performAction:grey_tap()]; performAction:grey_tap()];
if ([ChromeEarlGrey isIllustratedEmptyStatesEnabled]) { if (base::FeatureList::IsEnabled(kIllustratedEmptyStates)) {
// When the user has no bookmarks, the root view should be an empty state. // When the user has no bookmarks, the root view should be an empty state.
[BookmarkEarlGreyUI verifyEmptyState]; [BookmarkEarlGreyUI verifyEmptyState];
} else { } else {
......
...@@ -164,7 +164,10 @@ void SearchBookmarksForText(NSString* search_text) { ...@@ -164,7 +164,10 @@ void SearchBookmarksForText(NSString* search_text) {
- (void)testEmptyManagedBookmarks { - (void)testEmptyManagedBookmarks {
[BookmarkEarlGreyUI openBookmarks]; [BookmarkEarlGreyUI openBookmarks];
[BookmarkEarlGreyUI verifyEmptyState]; // Mobile bookmarks exists.
[[EarlGrey selectElementWithMatcher:TappableBookmarkNodeWithLabel(
@"Mobile Bookmarks")]
assertWithMatcher:grey_notNil()];
// Managed bookmarks folder does not exist. // Managed bookmarks folder does not exist.
[[EarlGrey selectElementWithMatcher:TappableBookmarkNodeWithLabel( [[EarlGrey selectElementWithMatcher:TappableBookmarkNodeWithLabel(
......
...@@ -144,8 +144,8 @@ id<GREYMatcher> TitleOfTestPage() { ...@@ -144,8 +144,8 @@ id<GREYMatcher> TitleOfTestPage() {
IDS_HISTORY_TITLE)), IDS_HISTORY_TITLE)),
grey_accessibilityTrait( grey_accessibilityTrait(
UIAccessibilityTraitHeader), UIAccessibilityTraitHeader),
grey_sufficientlyVisible(), nil)] nil)]
assertWithMatcher:grey_notNil()]; assertWithMatcher:grey_sufficientlyVisible()];
// Close History. // Close History.
id<GREYMatcher> exitMatcher = id<GREYMatcher> exitMatcher =
......
...@@ -226,17 +226,11 @@ id<GREYMatcher> NoBookmarksLabel() { ...@@ -226,17 +226,11 @@ id<GREYMatcher> NoBookmarksLabel() {
// Open the Bookmarks screen on the Tools menu. // Open the Bookmarks screen on the Tools menu.
[BookmarkEarlGreyUI openBookmarks]; [BookmarkEarlGreyUI openBookmarks];
[BookmarkEarlGreyUI openMobileBookmarks];
// Assert that there are no bookmarks. // Assert that there are no bookmarks.
if ([ChromeEarlGrey isIllustratedEmptyStatesEnabled]) {
// The empty background appears in the root directory if the leaf folders
// are empty.
[BookmarkEarlGreyUI verifyEmptyBackgroundAppears];
} else {
[BookmarkEarlGreyUI openMobileBookmarks];
[[EarlGrey selectElementWithMatcher:NoBookmarksLabel()] [[EarlGrey selectElementWithMatcher:NoBookmarksLabel()]
assertWithMatcher:grey_notNil()]; assertWithMatcher:grey_notNil()];
}
} }
// Tests that signing out from a managed user account clears the user's data. // Tests that signing out from a managed user account clears the user's data.
...@@ -255,17 +249,11 @@ id<GREYMatcher> NoBookmarksLabel() { ...@@ -255,17 +249,11 @@ id<GREYMatcher> NoBookmarksLabel() {
// Open the Bookmarks screen on the Tools menu. // Open the Bookmarks screen on the Tools menu.
[BookmarkEarlGreyUI openBookmarks]; [BookmarkEarlGreyUI openBookmarks];
[BookmarkEarlGreyUI openMobileBookmarks];
// Assert that there are no bookmarks. // Assert that there are no bookmarks.
if ([ChromeEarlGrey isIllustratedEmptyStatesEnabled]) {
// The empty background appears in the root directory if the leaf folders
// are empty.
[BookmarkEarlGreyUI verifyEmptyBackgroundAppears];
} else {
[BookmarkEarlGreyUI openMobileBookmarks];
[[EarlGrey selectElementWithMatcher:NoBookmarksLabel()] [[EarlGrey selectElementWithMatcher:NoBookmarksLabel()]
assertWithMatcher:grey_notNil()]; assertWithMatcher:grey_notNil()];
}
} }
// Tests that given two accounts A and B that are available on the device - // Tests that given two accounts A and B that are available on the device -
......
...@@ -3562,21 +3562,6 @@ ...@@ -3562,21 +3562,6 @@
] ]
} }
], ],
"IllustratedEmptyStates": [
{
"platforms": [
"ios"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"IllustratedEmptyStates"
]
}
]
}
],
"IncludeBetaForumMenuItem": [ "IncludeBetaForumMenuItem": [
{ {
"platforms": [ "platforms": [
......
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