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

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: 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
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 {
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
372 // Short delay to allow animation to complete and let time for the "Settings"
373 // label to arrive (issue with flakyness, see crbug.com/718023).
374 base::test::ios::SpinRunLoopWithMaxDelay(base::TimeDelta::FromSecondsD(0.5));
baxley 2017/05/31 15:51:29 delays are bad to use in tests. In the best case,
jlebel 2017/05/31 16:16:40 This test doesn't fail to find "Settings", neither
baxley 2017/05/31 16:29:39 What about if you add more matcher constraints by
jlebel 2017/06/01 15:01:45 Since according to the log, the UI is still on the
375
376 // Tap Settings link. 376 // Tap Settings link.
377 id<GREYMatcher> settings_link_matcher = grey_allOf( 377 id<GREYMatcher> settings_link_matcher = grey_allOf(
378 grey_accessibilityLabel(@"Settings"), grey_sufficientlyVisible(), nil); 378 grey_accessibilityLabel(@"Settings"), grey_sufficientlyVisible(), nil);
379 [[EarlGrey selectElementWithMatcher:settings_link_matcher] 379 [[EarlGrey selectElementWithMatcher:settings_link_matcher]
380 performAction:grey_tap()]; 380 performAction:grey_tap()];
381 381
382 [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()] 382 [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()]
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.
(...skipping 203 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

Powered by Google App Engine
This is Rietveld 408576698