Add AddCardVC snapshots for other countries

To get full strings coverage
This commit is contained in:
Brian Dorfman 2016-10-21 10:43:15 -07:00
parent d77dff2823
commit 8711d9b78b
34 changed files with 19 additions and 2 deletions

View File

@ -207,6 +207,10 @@
}
- (void)delegateCountryCodeDidChange:(NSString *)countryCode {
if (self.type == STPAddressFieldTypeCountry) {
self.contents = countryCode;
}
self.ourCountryCode = countryCode;
_postalCodeType = [STPPostalCodeValidator postalCodeTypeForCountryCode:self.ourCountryCode];
[self updateTextFieldsAndCaptions];

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

@ -9,6 +9,8 @@
#import <FBSnapshotTestCase/FBSnapshotTestCase.h>
#import <Stripe/Stripe.h>
#import "STPSwitchTableViewCell.h"
#import "STPAddressViewModel.h"
#import "STPAddressFieldTableViewCell.h"
@interface STPAddCardViewControllerLocalizationTests : FBSnapshotTestCase
@ -16,7 +18,8 @@
@interface STPAddCardViewController (TestsPrivate)
@property(nonatomic) UITableView *tableView;
@property(nonatomic)BOOL forceEnableRememberMeForTesting;
@property(nonatomic) BOOL forceEnableRememberMeForTesting;
@property(nonatomic) STPAddressViewModel<STPAddressFieldTableViewCellDelegate> *addressViewModel;
@end
@implementation STPAddCardViewControllerLocalizationTests
@ -48,7 +51,17 @@
[navController.view layoutIfNeeded];
navController.view.frame = CGRectMake(0, 0, 320, addCardVC.tableView.contentSize.height);
FBSnapshotVerifyView(navController.view, nil)
addCardVC.addressViewModel.addressFieldTableViewCountryCode = @"US";
FBSnapshotVerifyView(navController.view, @"US");
addCardVC.addressViewModel.addressFieldTableViewCountryCode = @"GB";
FBSnapshotVerifyView(navController.view, @"GB");
addCardVC.addressViewModel.addressFieldTableViewCountryCode = @"CA";
FBSnapshotVerifyView(navController.view, @"CA");
addCardVC.addressViewModel.addressFieldTableViewCountryCode = @"MX";
FBSnapshotVerifyView(navController.view, @"MX");
[STPLocalizationUtils overrideLanguageTo:nil];
}