Commit 6141983f authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][MF][EG2] Move Profile Matchers

Move profile matchers so they can be used from the app interface.

Bug: 1016809
Change-Id: I6179a151c5c82d5f94edb144e2d1241fc11745d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1873888
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708936}
parent 369a7170
......@@ -374,8 +374,14 @@ id<GREYMatcher> SettingsPasswordMatcher();
// Returns a matcher for the search bar in password settings.
id<GREYMatcher> SettingsPasswordSearchMatcher();
// Returns a matcher for the profiles settings collection view.
id<GREYMatcher> SettingsProfileMatcher();
#pragma mark - Manual Fallback
// Returns a matcher for the scroll view in keyboard accessory bar.
id<GREYMatcher> ManualFallbackFormSuggestionViewMatcher();
// Returns a matcher for the keyboard icon in the keyboard accessory bar.
id<GREYMatcher> ManualFallbackKeyboardIconMatcher();
......@@ -404,6 +410,21 @@ id<GREYMatcher> ManualFallbackPasswordButtonMatcher();
// Returns a matcher for the PasswordTableView window.
id<GREYMatcher> ManualFallbackPasswordTableViewWindowMatcher();
// Returns a matcher for the profiles icon in the keyboard accessory bar.
id<GREYMatcher> ManualFallbackProfilesIconMatcher();
// Returns a matcher for the profiles table view in manual fallback.
id<GREYMatcher> ManualFallbackProfilesTableViewMatcher();
// Returns a matcher for the button to open profile settings in manual
// fallback.
id<GREYMatcher> ManualFallbackManageProfilesMatcher();
// Returns a matcher for the profiles settings collection view.
id<GREYMatcher> SettingsProfileMatcher();
// Returns a matcher for the ProfileTableView window.
id<GREYMatcher> ManualFallbackProfileTableViewWindowMatcher();
} // namespace chrome_test_util
#endif // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_
......@@ -467,8 +467,16 @@ id<GREYMatcher> SettingsPasswordSearchMatcher() {
return [ChromeMatchersAppInterface settingsPasswordSearchMatcher];
}
id<GREYMatcher> SettingsProfileMatcher() {
return [ChromeMatchersAppInterface settingsProfileMatcher];
}
#pragma mark - Manual Fallback
id<GREYMatcher> ManualFallbackFormSuggestionViewMatcher() {
return [ChromeMatchersAppInterface manualFallbackFormSuggestionViewMatcher];
}
id<GREYMatcher> ManualFallbackKeyboardIconMatcher() {
return [ChromeMatchersAppInterface manualFallbackKeyboardIconMatcher];
}
......@@ -507,4 +515,21 @@ id<GREYMatcher> ManualFallbackPasswordTableViewWindowMatcher() {
[ChromeMatchersAppInterface manualFallbackPasswordTableViewWindowMatcher];
}
id<GREYMatcher> ManualFallbackProfilesIconMatcher() {
return [ChromeMatchersAppInterface manualFallbackProfilesIconMatcher];
}
id<GREYMatcher> ManualFallbackProfilesTableViewMatcher() {
return [ChromeMatchersAppInterface manualFallbackProfilesTableViewMatcher];
}
id<GREYMatcher> ManualFallbackManageProfilesMatcher() {
return [ChromeMatchersAppInterface manualFallbackManageProfilesMatcher];
}
id<GREYMatcher> ManualFallbackProfileTableViewWindowMatcher() {
return
[ChromeMatchersAppInterface manualFallbackProfileTableViewWindowMatcher];
}
} // namespace chrome_test_util
......@@ -379,8 +379,14 @@
// Returns a matcher for the search bar in password settings.
+ (id<GREYMatcher>)settingsPasswordSearchMatcher;
// Returns a matcher for the profiles settings collection view.
+ (id<GREYMatcher>)settingsProfileMatcher;
#pragma mark - Manual Fallback
// Returns a matcher for the scroll view in keyboard accessory bar.
+ (id<GREYMatcher>)manualFallbackFormSuggestionViewMatcher;
// Returns a matcher for the keyboard icon in the keyboard accessory bar.
+ (id<GREYMatcher>)manualFallbackKeyboardIconMatcher;
......@@ -409,6 +415,18 @@
// Returns a matcher for the PasswordTableView window.
+ (id<GREYMatcher>)manualFallbackPasswordTableViewWindowMatcher;
// Returns a matcher for the profiles icon in the keyboard accessory bar.
+ (id<GREYMatcher>)manualFallbackProfilesIconMatcher;
// Returns a matcher for the profiles table view in manual fallback.
+ (id<GREYMatcher>)manualFallbackProfilesTableViewMatcher;
// Returns a matcher for the button to open profile settings in manual
// fallback.
+ (id<GREYMatcher>)manualFallbackManageProfilesMatcher;
// Returns a matcher for the ProfileTableView window.
+ (id<GREYMatcher>)manualFallbackProfileTableViewWindowMatcher;
@end
#endif // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_APP_INTERFACE_H_
......@@ -8,7 +8,10 @@
#include "base/strings/sys_string_conversions.h"
#include "components/strings/grit/components_strings.h"
#include "components/unified_consent/feature.h"
#import "ios/chrome/browser/autofill/form_suggestion_constants.h"
#import "ios/chrome/browser/ui/authentication/cells/signin_promo_view.h"
#import "ios/chrome/browser/ui/autofill/manual_fill/address_mediator.h"
#import "ios/chrome/browser/ui/autofill/manual_fill/address_view_controller.h"
#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_accessory_view_controller.h"
#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_cell.h"
#import "ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_mediator.h"
......@@ -27,6 +30,7 @@
#import "ios/chrome/browser/ui/recent_tabs/recent_tabs_constants.h"
#import "ios/chrome/browser/ui/settings/autofill/autofill_add_credit_card_view_controller.h"
#import "ios/chrome/browser/ui/settings/autofill/autofill_credit_card_table_view_controller.h"
#import "ios/chrome/browser/ui/settings/autofill/autofill_profile_table_view_controller.h"
#import "ios/chrome/browser/ui/settings/cells/clear_browsing_data_constants.h"
#import "ios/chrome/browser/ui/settings/cells/settings_switch_cell.h"
#import "ios/chrome/browser/ui/settings/cells/settings_switch_item.h"
......@@ -741,8 +745,16 @@ UIView* SubviewWithAccessibilityIdentifier(NSString* accessibility_id,
return grey_accessibilityID(kPasswordsSearchBarId);
}
+ (id<GREYMatcher>)settingsProfileMatcher {
return grey_accessibilityID(kAutofillProfileTableViewID);
}
#pragma mark - Manual Fallback
+ (id<GREYMatcher>)manualFallbackFormSuggestionViewMatcher {
return grey_accessibilityID(kFormSuggestionsViewAccessibilityIdentifier);
}
+ (id<GREYMatcher>)manualFallbackPasswordIconMatcher {
return grey_accessibilityID(
manual_fill::AccessoryPasswordAccessibilityIdentifier);
......@@ -789,4 +801,25 @@ UIView* SubviewWithAccessibilityIdentifier(NSString* accessibility_id,
return grey_allOf(classMatcher, parentMatcher, nil);
}
+ (id<GREYMatcher>)manualFallbackProfilesIconMatcher {
return grey_accessibilityID(
manual_fill::AccessoryAddressAccessibilityIdentifier);
}
+ (id<GREYMatcher>)manualFallbackProfilesTableViewMatcher {
return grey_accessibilityID(
manual_fill::AddressTableViewAccessibilityIdentifier);
}
+ (id<GREYMatcher>)manualFallbackManageProfilesMatcher {
return grey_accessibilityID(
manual_fill::ManageAddressAccessibilityIdentifier);
}
+ (id<GREYMatcher>)manualFallbackProfileTableViewWindowMatcher {
id<GREYMatcher> classMatcher = grey_kindOfClass([UIWindow class]);
id<GREYMatcher> parentMatcher =
grey_descendant([self manualFallbackProfilesTableViewMatcher]);
return grey_allOf(classMatcher, parentMatcher, nil);
}
@end
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