Commit 4d7fc2a3 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Reenable AddCreditCardTestCase

This is mostly to try to reproduce the breakage.

Bug: 1013462
Change-Id: I806d8e78475bf343c35b4c1ab5459201ffdfff48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1876327Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715633}
parent 690f0fae
...@@ -114,62 +114,17 @@ id<GREYMatcher> CardNumberIconView(NSString* icon_type) { ...@@ -114,62 +114,17 @@ id<GREYMatcher> CardNumberIconView(NSString* icon_type) {
#pragma mark - Test that all fields on the 'Add Credit Card' screen appear #pragma mark - Test that all fields on the 'Add Credit Card' screen appear
// Tests that 'Name on Card' field appears on screen. // Tests the different fixed elements (labels, buttons) are present on the
// TODO(crbug.com/1016353): Test disabled on iOS 13 iPhone. // screen.
- (void)testNameOnCardFieldIsPresent { - (void)testElementsPresent {
#if TARGET_IPHONE_SIMULATOR
if (base::ios::IsRunningOnOrLater(13, 0, 0)) {
EARL_GREY_TEST_SKIPPED(@"Test fails iPhone 7 13.0");
}
#endif // TARGET_IPHONE_SIMULATOR
[[EarlGrey selectElementWithMatcher:NameOnCardField()] [[EarlGrey selectElementWithMatcher:NameOnCardField()]
assertWithMatcher:grey_sufficientlyVisible()]; assertWithMatcher:grey_sufficientlyVisible()];
}
// Tests that 'Card Number' field appears on screen.
// TODO(crbug.com/1016353): Test disabled on iOS 13 iPhone.
- (void)testCardNumberFieldIsPresent {
#if TARGET_IPHONE_SIMULATOR
if (base::ios::IsRunningOnOrLater(13, 0, 0)) {
EARL_GREY_TEST_SKIPPED(@"Test fails iPhone 7 13.0");
}
#endif // TARGET_IPHONE_SIMULATOR
[[EarlGrey selectElementWithMatcher:CardNumberField()] [[EarlGrey selectElementWithMatcher:CardNumberField()]
assertWithMatcher:grey_sufficientlyVisible()]; assertWithMatcher:grey_sufficientlyVisible()];
}
// Tests that 'Month of Expiry' field appears on screen.
// TODO(crbug.com/1016353): Test disabled on iOS 13 iPhone.
- (void)testMonthOfExpiryFieldIsPresent {
#if TARGET_IPHONE_SIMULATOR
if (base::ios::IsRunningOnOrLater(13, 0, 0)) {
EARL_GREY_TEST_SKIPPED(@"Test fails iPhone 7 13.0");
}
#endif // TARGET_IPHONE_SIMULATOR
[[EarlGrey selectElementWithMatcher:MonthOfExpiryField()] [[EarlGrey selectElementWithMatcher:MonthOfExpiryField()]
assertWithMatcher:grey_sufficientlyVisible()]; assertWithMatcher:grey_sufficientlyVisible()];
}
// Tests that 'Year of Expiry' field appears on screen.
// TODO(crbug.com/1016353): Test disabled on iOS 13 iPhone.
- (void)testYearOfExpiryFieldIsPresent {
#if TARGET_IPHONE_SIMULATOR
if (base::ios::IsRunningOnOrLater(13, 0, 0)) {
EARL_GREY_TEST_SKIPPED(@"Test fails iPhone 7 13.0");
}
#endif // TARGET_IPHONE_SIMULATOR
[[EarlGrey selectElementWithMatcher:YearOfExpiryField()] [[EarlGrey selectElementWithMatcher:YearOfExpiryField()]
assertWithMatcher:grey_sufficientlyVisible()]; assertWithMatcher:grey_sufficientlyVisible()];
}
// Tests that 'Use Camera' button appears on screen only for iOS 13.
// TODO(crbug.com/1016353): Test disabled on iOS 13 iPhone.
- (void)testUseCameraButtonIsPresent {
#if TARGET_IPHONE_SIMULATOR
if (base::ios::IsRunningOnOrLater(13, 0, 0)) {
EARL_GREY_TEST_SKIPPED(@"Test fails iPhone 7 13.0");
}
#endif // TARGET_IPHONE_SIMULATOR
if (@available(iOS 13, *)) { if (@available(iOS 13, *)) {
[[EarlGrey selectElementWithMatcher:UseCameraButton()] [[EarlGrey selectElementWithMatcher:UseCameraButton()]
assertWithMatcher:grey_sufficientlyVisible()]; assertWithMatcher:grey_sufficientlyVisible()];
...@@ -177,6 +132,10 @@ id<GREYMatcher> CardNumberIconView(NSString* icon_type) { ...@@ -177,6 +132,10 @@ id<GREYMatcher> CardNumberIconView(NSString* icon_type) {
[[EarlGrey selectElementWithMatcher:UseCameraButton()] [[EarlGrey selectElementWithMatcher:UseCameraButton()]
assertWithMatcher:grey_nil()]; assertWithMatcher:grey_nil()];
} }
[[EarlGrey
selectElementWithMatcher:chrome_test_util::AddCreditCardCancelButton()]
performAction:grey_tap()];
} }
#pragma mark - Test top toolbar buttons #pragma mark - Test top toolbar buttons
......
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