Commit cf4e7dcb authored by Nohemi Fernandez's avatar Nohemi Fernandez Committed by Commit Bot

[iOS] Fix broken tests due to missing completion in fake ViewController.

AddAccountSigninManagerTests were failing due to a missing run
completion. Remove intermediary method that causes this failure.

Bug: 1078815
Change-Id: I1766e593927cd40be318cf66bb67d11f5ed47006
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264057
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Reviewed-by: default avatarJérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782928}
parent 1164003e
...@@ -496,9 +496,8 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) { ...@@ -496,9 +496,8 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
[SigninEarlGreyUtils [SigninEarlGreyUtils
waitForMatcher:grey_accessibilityID(kFakeAddAccountViewIdentifier)]; waitForMatcher:grey_accessibilityID(kFakeAddAccountViewIdentifier)];
// Close the SSO view controller. // Close the SSO view controller.
id<GREYMatcher> matcher = id<GREYMatcher> matcher = grey_allOf(ButtonWithAccessibilityLabel(@"Cancel"),
grey_allOf(chrome_test_util::ButtonWithAccessibilityLabel(@"Cancel"), grey_sufficientlyVisible(), nil);
grey_sufficientlyVisible(), nil);
[[EarlGrey selectElementWithMatcher:matcher] performAction:grey_tap()]; [[EarlGrey selectElementWithMatcher:matcher] performAction:grey_tap()];
// Make sure the SSO view controller is fully removed before ending the test. // Make sure the SSO view controller is fully removed before ending the test.
// The tear down needs to remove other view controllers, and it cannot be done // The tear down needs to remove other view controllers, and it cannot be done
...@@ -515,11 +514,14 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) { ...@@ -515,11 +514,14 @@ void ChooseImportOrKeepDataSepareteDialog(id<GREYMatcher> choiceButtonMatcher) {
[SigninEarlGreyUI tapAddAccountButton]; [SigninEarlGreyUI tapAddAccountButton];
[self assertFakeSSOScreenIsVisible]; [self assertFakeSSOScreenIsVisible];
// Close sign-in screen and Settings. // Close sign-in screen and Settings.
[[EarlGrey selectElementWithMatcher: [[EarlGrey selectElementWithMatcher:
ButtonWithAccessibilityLabelId( ButtonWithAccessibilityLabelId(
IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SKIP_BUTTON)] IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SKIP_BUTTON)]
performAction:grey_tap()]; performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:SettingsDoneButton()]
performAction:grey_tap()];
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
} }
......
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
[self runCompletionCallbackWithError:error]; [self runCompletionCallbackWithError:error];
return; return;
} }
[self.delegate interactionManager:self [_viewController
dismissViewControllerAnimated:animated dismissViewControllerAnimated:animated
completion:^{ completion:^{
[self runCompletionCallbackWithError:error]; [self runCompletionCallbackWithError:error];
......
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