Commit f20fb4a0 authored by Rohit Rao's avatar Rohit Rao Committed by Commit Bot

[ios] Fixes testRecentTabSigninPromoReloadedWhileHidden.

Recent Tabs tableview cells are no longer marked with the Button a11y trait, so
the matcher for the "Other Devices" button needed to be updated accordingly.

BUG=825431
TEST=None

Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I2daa26fb0b2aa2fa45d4df0b62361f512fcb243e
Reviewed-on: https://chromium-review.googlesource.com/1008046Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549961}
parent 3a491133
...@@ -185,10 +185,13 @@ id<GREYMatcher> TitleOfTestPage() { ...@@ -185,10 +185,13 @@ id<GREYMatcher> TitleOfTestPage() {
closeButton:NO]; closeButton:NO];
// Tap on "Other Devices", to hide the sign-in promo. // Tap on "Other Devices", to hide the sign-in promo.
[[EarlGrey NSString* otherDevicesLabel =
selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabel( l10n_util::GetNSString(IDS_IOS_RECENT_TABS_OTHER_DEVICES);
l10n_util::GetNSString( id<GREYMatcher> otherDevicesMatcher =
IDS_IOS_RECENT_TABS_OTHER_DEVICES))] IsUIRefreshPhase1Enabled()
? grey_accessibilityLabel(otherDevicesLabel)
: chrome_test_util::ButtonWithAccessibilityLabel(otherDevicesLabel);
[[EarlGrey selectElementWithMatcher:otherDevicesMatcher]
performAction:grey_tap()]; performAction:grey_tap()];
[SigninEarlGreyUtils checkSigninPromoNotVisible]; [SigninEarlGreyUtils checkSigninPromoNotVisible];
...@@ -197,11 +200,8 @@ id<GREYMatcher> TitleOfTestPage() { ...@@ -197,11 +200,8 @@ id<GREYMatcher> TitleOfTestPage() {
ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity( ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity(
identity); identity);
// Tap on "Other Devcies", to show the sign-in promo. // Tap on "Other Devices", to show the sign-in promo.
[[EarlGrey [[EarlGrey selectElementWithMatcher:otherDevicesMatcher]
selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabel(
l10n_util::GetNSString(
IDS_IOS_RECENT_TABS_OTHER_DEVICES))]
performAction:grey_tap()]; performAction:grey_tap()];
[SigninEarlGreyUtils [SigninEarlGreyUtils
checkSigninPromoVisibleWithMode:SigninPromoViewModeWarmState checkSigninPromoVisibleWithMode:SigninPromoViewModeWarmState
......
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