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

Unified Diff: ios/chrome/browser/ui/settings/passwords_settings_egtest.mm

Issue 2860453004: Fix PasswordsSettingsTestCase.testCopyPasswordToast (Closed)
Patch Set: Fix PasswordsSettingsTestCase.testCopyPasswordToast Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/settings/passwords_settings_egtest.mm
diff --git a/ios/chrome/browser/ui/settings/passwords_settings_egtest.mm b/ios/chrome/browser/ui/settings/passwords_settings_egtest.mm
index d3ec529a471b19997416d43f6bbb14c64a625438..669cc9232699f247d29ca08d16f2b9a6cb11749d 100644
--- a/ios/chrome/browser/ui/settings/passwords_settings_egtest.mm
+++ b/ios/chrome/browser/ui/settings/passwords_settings_egtest.mm
@@ -339,8 +339,7 @@ id<GREYMatcher> CopyPasswordButton() {
// Checks that attempts to copy a password provide appropriate feedback,
// both when reauthentication succeeds and when it fails.
-// TODO(crbug.com/718043): Re-enable test.
-- (void)DISABLED_testCopyPasswordToast {
+- (void)testCopyPasswordToast {
[self scopedEnablePasswordManagementAndViewingUI];
// Saving a form is needed for using the "password details" view.
@@ -373,8 +372,13 @@ id<GREYMatcher> CopyPasswordButton() {
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
NSString* snackbarLabel =
l10n_util::GetNSString(IDS_IOS_SETTINGS_PASSWORD_WAS_COPIED_MESSAGE);
+ // Tap the label instead of asserting that it is there, and wait until the
+ // tap causes it to close. Otherwise it will block the copy button for the
+ // rest of the test on small devices, and scrolling to reach the button
+ // won't work when the snackbar is up.
[[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(snackbarLabel)]
- assertWithMatcher:grey_notNil()];
+ performAction:grey_tap()];
+ [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
baxley 2017/05/03 18:07:11 Does this guarantee that the snackbar is gone when
vabr (Chromium) 2017/05/03 20:32:26 I have good news. When I caused the fade-out anima
// Check the snackbar in case of failed reauthentication.
mock_reauthentication_module.shouldSucceed = NO;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698