Commit 49fb7b6b authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

[iOS] Reenable unity tests

Updating +[ChromeMatchers googleServicesSettingsButton], to find the
"Sync and Google services" cell. This cell cannot be found with its
accessibility text since the sync status (detail text of the cell)
can vary.

The issue was created with:
crrev.com/c/1497003

Bug: 937855
Change-Id: Ia8ab1f90a3c8476f2710b48cdcacb1278aa292e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1503414Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638302}
parent 0cb1be90
......@@ -40,8 +40,7 @@ using chrome_test_util::SettingsDoneButton;
@synthesize scrollViewMatcher = _scrollViewMatcher;
// Opens the Google services settings view, and closes it.
// TODO(crbug.com/937855):reenable this test.
- (void)DISABLED_testOpenGoogleServicesSettings {
- (void)testOpenGoogleServicesSettings {
[self openGoogleServicesSettings];
// Assert title and accessibility.
......@@ -55,8 +54,7 @@ using chrome_test_util::SettingsDoneButton;
}
// Tests the Google Services settings.
// TODO(crbug.com/937855):reenable this test.
- (void)DISABLED_testOpeningServices {
- (void)testOpeningServices {
[self openGoogleServicesSettings];
[self assertNonPersonalizedServices];
}
......
......@@ -435,8 +435,14 @@ UIView* SubviewWithAccessibilityIdentifier(NSString* accessibilityID,
}
+ (id<GREYMatcher>)googleServicesSettingsButton {
return [ChromeMatchers
buttonWithAccessibilityLabelId:(IDS_IOS_GOOGLE_SERVICES_SETTINGS_TITLE)];
NSString* syncAndGoogleServicesTitle =
l10n_util::GetNSStringWithFixup(IDS_IOS_GOOGLE_SERVICES_SETTINGS_TITLE);
id<GREYMatcher> mainTextLabelMatcher =
grey_allOf(grey_accessibilityLabel(syncAndGoogleServicesTitle),
grey_sufficientlyVisible(), nil);
return grey_allOf(grey_kindOfClass([UITableViewCell class]),
grey_sufficientlyVisible(),
grey_descendant(mainTextLabelMatcher), nil);
}
+ (id<GREYMatcher>)settingsMenuBackButton {
......
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