Commit 005a38c5 authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

[iOS] Cleaning up ChromeEarlGreyUI

Second part of crrev.com/c/1138621 after crrev.com/i/652748 is landed.

Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ibff91f4bfb24351ea66b77c730e182bcb48426f2
Reviewed-on: https://chromium-review.googlesource.com/1140323Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576433}
parent 2f94ba20
......@@ -40,11 +40,9 @@
using chrome_test_util::AccountsSyncButton;
using chrome_test_util::ButtonWithAccessibilityLabelId;
using chrome_test_util::ClearBrowsingDataCollectionView;
using chrome_test_util::ClearBrowsingHistoryButton;
using chrome_test_util::GetIncognitoTabCount;
using chrome_test_util::IsIncognitoMode;
using chrome_test_util::IsSyncInitialized;
using chrome_test_util::SecondarySignInButton;
using chrome_test_util::SettingsAccountButton;
using chrome_test_util::SettingsDoneButton;
using chrome_test_util::SettingsMenuPrivacyButton;
......
......@@ -71,10 +71,6 @@
// GREYAssert is induced.
+ (void)waitForToolbarVisible:(BOOL)isVisible;
// Confirms the sign in confirmation page, scrolls first to make the OK button
// visible on short devices (e.g. iPhone 5s).
+ (void)confirmSigninConfirmationDialog;
@end
#endif // IOS_CHROME_TEST_EARL_GREY_CHROME_EARL_GREY_UI_H_
......@@ -6,7 +6,6 @@
#import "base/test/ios/wait_util.h"
#include "components/strings/grit/components_strings.h"
#include "ios/chrome/browser/ui/authentication/signin_confirmation_view_controller.h"
#import "ios/chrome/browser/ui/settings/accounts_collection_view_controller.h"
#import "ios/chrome/browser/ui/settings/privacy_collection_view_controller.h"
#import "ios/chrome/browser/ui/settings/settings_collection_view_controller.h"
......@@ -24,7 +23,6 @@
#error "This file requires ARC support."
#endif
using chrome_test_util::AccountConsistencyConfirmationOkButton;
using chrome_test_util::ClearBrowsingDataCollectionView;
using chrome_test_util::SettingsMenuButton;
using chrome_test_util::ToolsMenuView;
......@@ -168,23 +166,4 @@ id<GREYAction> ScrollDown() {
errorMessage);
}
+ (void)confirmSigninConfirmationDialog {
// Confirm sign in. "More" button is shown on short devices (e.g. iPhone 5s,
// iPhone SE), so needs to scroll first to dismiss the "More" button before
// taping on "OK".
// Cannot directly scroll on |kSignInConfirmationCollectionViewId| because it
// is a MDC collection view, not a UICollectionView, so itself is not
// scrollable.
// Wait until the sync confirmation is displayed.
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
id<GREYMatcher> signinUICollectionViewMatcher = grey_allOf(
grey_ancestor(grey_accessibilityID(kSigninConfirmationCollectionViewId)),
grey_kindOfClass([UICollectionView class]), nil);
[[EarlGrey selectElementWithMatcher:signinUICollectionViewMatcher]
performAction:grey_scrollToContentEdge(kGREYContentEdgeBottom)];
[[EarlGrey selectElementWithMatcher:AccountConsistencyConfirmationOkButton()]
performAction:grey_tap()];
}
@end
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