Add AddCardVC snapshots for other countries
To get full strings coverage
|
@ -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];
|
||||
|
|
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 133 KiB |
After Width: | Height: | Size: 135 KiB |
After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 125 KiB |
After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 125 KiB |
|
@ -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];
|
||||
}
|
||||
|
|