Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Side by Side Diff: ios/chrome/browser/ui/authentication/signin_interaction_controller_egtest.mm

Issue 2906313004: Making the gradient click-through in ChromeSigninViewController (Closed)
Patch Set: Adding WaitForMatcher() Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/ui/first_run/first_run_egtest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <EarlGrey/EarlGrey.h> 5 #import <EarlGrey/EarlGrey.h>
6 #import <XCTest/XCTest.h> 6 #import <XCTest/XCTest.h>
7 7
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #import "base/test/ios/wait_util.h" 9 #import "base/test/ios/wait_util.h"
10 #include "components/signin/core/browser/signin_manager.h" 10 #include "components/signin/core/browser/signin_manager.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 // Check that the settings home screen is shown. 352 // Check that the settings home screen is shown.
353 WaitForMatcher(grey_accessibilityID(kSettingsSignInCellId)); 353 WaitForMatcher(grey_accessibilityID(kSettingsSignInCellId));
354 354
355 [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()] 355 [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()]
356 performAction:grey_tap()]; 356 performAction:grey_tap()];
357 357
358 // Check that there is no signed in user. 358 // Check that there is no signed in user.
359 AssertAuthenticatedIdentityInActiveProfile(nil); 359 AssertAuthenticatedIdentityInActiveProfile(nil);
360 } 360 }
361 361
362 // Tests that signing in, tapping the Settings link on the confirmation screen 362 - (void)testSignInOpenSettings {
363 // and closing the Settings correctly leaves the user signed in without any
364 // Settings shown.
365 // TODO(crbug.com/718023): Re-enable test.
366 - (void)DISABLED_testSignInOpenSettings {
baxley 2017/06/01 15:36:21 If you prefix it with FLAKY_ (i.e. s/DISABLED_/FLA
jlebel 2017/06/02 09:28:25 Done.
367 ChromeIdentity* identity = GetFakeIdentity1(); 363 ChromeIdentity* identity = GetFakeIdentity1();
368 ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity( 364 ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity(
369 identity); 365 identity);
370 366
371 // Sign in to |identity|. 367 // Sign in to |identity|.
372 OpenSignInFromSettings(); 368 OpenSignInFromSettings();
373 TapButtonWithAccessibilityLabel(identity.userEmail); 369 TapButtonWithAccessibilityLabel(identity.userEmail);
374 TapButtonWithLabelId(IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SIGNIN_BUTTON); 370 TapButtonWithLabelId(IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SIGNIN_BUTTON);
375 371
376 // Tap Settings link. 372 // Tap Settings link.
377 id<GREYMatcher> settings_link_matcher = grey_allOf( 373 id<GREYMatcher> settings_link_matcher = grey_allOf(
378 grey_accessibilityLabel(@"Settings"), grey_sufficientlyVisible(), nil); 374 grey_accessibilityLabel(@"Settings"), grey_sufficientlyVisible(),
375 grey_enabled(), grey_interactable(), nil);
376 WaitForMatcher(settings_link_matcher);
379 [[EarlGrey selectElementWithMatcher:settings_link_matcher] 377 [[EarlGrey selectElementWithMatcher:settings_link_matcher]
380 performAction:grey_tap()]; 378 performAction:grey_tap()];
381 379
382 [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()] 380 id<GREYMatcher> done_button_matcher = NavigationBarDoneButton();
381 WaitForMatcher(done_button_matcher);
382 [[EarlGrey selectElementWithMatcher:done_button_matcher]
383 performAction:grey_tap()]; 383 performAction:grey_tap()];
384 384
385 // All Settings should be gone and user signed in. 385 // All Settings should be gone and user signed in.
386 id<GREYMatcher> settings_matcher = 386 id<GREYMatcher> settings_matcher =
387 chrome_test_util::StaticTextWithAccessibilityLabelId( 387 chrome_test_util::StaticTextWithAccessibilityLabelId(
388 IDS_IOS_SETTINGS_TITLE); 388 IDS_IOS_SETTINGS_TITLE);
389 [[EarlGrey selectElementWithMatcher:settings_matcher] 389 [[EarlGrey selectElementWithMatcher:settings_matcher]
390 assertWithMatcher:grey_notVisible()]; 390 assertWithMatcher:grey_notVisible()];
391 AssertAuthenticatedIdentityInActiveProfile(identity); 391 AssertAuthenticatedIdentityInActiveProfile(identity);
392 } 392 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 589
590 // Close sign-in screen and Bookmarks. 590 // Close sign-in screen and Bookmarks.
591 TapButtonWithLabelId(IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SKIP_BUTTON); 591 TapButtonWithLabelId(IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SKIP_BUTTON);
592 if (!IsIPadIdiom()) { 592 if (!IsIPadIdiom()) {
593 [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()] 593 [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()]
594 performAction:grey_tap()]; 594 performAction:grey_tap()];
595 } 595 }
596 } 596 }
597 597
598 @end 598 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/first_run/first_run_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698