Skip to content

Commit

Permalink
Use Xcode version Xcode 14.3 in CI unit tests so that we can use asyn… (
Browse files Browse the repository at this point in the history
#2733)

* Use Xcode version Xcode 14.3 in CI unit tests so that we can use async/await in tests without deadlocking (see https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes)

* Try updating default test device from 16.1 to 16.4

* Only update test device for framework-tests

* Update 16.1 -> 16.4 in scripts

* Update snapshot tests

* Update more snapshot tests
  • Loading branch information
yuki-stripe authored Jul 18, 2023
1 parent bd12599 commit 04bfde4
Show file tree
Hide file tree
Showing 110 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import iOSSnapshotTestCase
class STPAUBECSDebitFormViewSnapshotTests: FBSnapshotTestCase {
override func setUp() {
super.setUp()
// self.recordMode = true
// self.recordMode = true
}

func testDefaultAppearance() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class STPAddCardViewControllerLocalizationTests: FBSnapshotTestCase {
override func setUp() {
super.setUp()

// self.recordMode = true
// self.recordMode = true
}

func performSnapshotTest(forLanguage language: String?, delivery: Bool) {
Expand All @@ -42,9 +42,9 @@ class STPAddCardViewControllerLocalizationTests: FBSnapshotTestCase {
addCardVC.addressViewModel.addressFieldTableViewCountryCode = "INVALID"
STPSnapshotVerifyView(viewToTest, identifier: "delivery")
} else {
/// This method rejects nil or empty country codes to stop strange looking behavior
/// when scrolling to the top "unset" position in the picker, so put in
/// an invalid country code instead to test seeing the "Country" placeholder
// This method rejects nil or empty country codes to stop strange looking behavior
// when scrolling to the top "unset" position in the picker, so put in
// an invalid country code instead to test seeing the "Country" placeholder
addCardVC.addressViewModel.addressFieldTableViewCountryCode = "INVALID"
STPSnapshotVerifyView(viewToTest, identifier: "no_country")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class STPFloatingPlaceholderTextFieldSnapshotTests: FBSnapshotTestCase {

override func setUp() {
super.setUp()
// recordMode = true
// recordMode = true
}

// MARK: Not Floating
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class IndividualWelcomeViewControllerSnapshotTest: FBSnapshotTestCase {

override func setUp() {
super.setUp()
// recordMode = true
// recordMode = true
}

func testViewIsConfiguredFromAPI() throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class NSAttributedString_HTMLSnapshotTest: FBSnapshotTestCase {
// Test that link color matches tint color
textView.tintColor = .systemPink

// recordMode = true
// recordMode = true
}

func testDefaultStyle() throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class SuccessViewControllerSnapshotTest: FBSnapshotTestCase {
override func setUp() {
super.setUp()

// recordMode = true
// recordMode = true
}

func testViewIsConfiguredFromAPI() {
Expand Down
Binary file modified ...entViewControllerSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...erSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...omeViewControllerSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...Tests.NSAttributedString_HTMLSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ests.NSAttributedString_HTMLSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...uccessViewControllerSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...PFloatingPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...holderTextFieldSnapshotTests/[email protected]
Binary file modified ...PlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...laceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...TPFloatingPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...eholderTextFieldSnapshotTests/[email protected]
Binary file modified ...gPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...PlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...laceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...tingPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...ingPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...ingPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...TextFieldSnapshotTests/[email protected]
Binary file modified ...olderTextFieldSnapshotTests/[email protected]
Binary file modified ...lderTextFieldSnapshotTests/[email protected]
Binary file modified ...TPFloatingPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...eholderTextFieldSnapshotTests/[email protected]
Binary file modified ...gPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...PlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...oatingPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...derTextFieldSnapshotTests/[email protected]
Binary file modified ...ceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...eholderTextFieldSnapshotTests/[email protected]
Binary file modified ...loatingPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...lderTextFieldSnapshotTests/[email protected]
Binary file modified ...aceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...ceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...TPFloatingPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...eholderTextFieldSnapshotTests/[email protected]
Binary file modified ...gPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...PlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...PlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...tFieldSnapshotTests/[email protected]
Binary file modified ...erTextFieldSnapshotTests/[email protected]
Binary file modified ...rTextFieldSnapshotTests/[email protected]
Binary file modified ...loatingPlaceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...lderTextFieldSnapshotTests/[email protected]
Binary file modified ...aceholderTextFieldSnapshotTests/[email protected]
Binary file modified ...ceholderTextFieldSnapshotTests/[email protected]
6 changes: 6 additions & 0 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ workflows:
before_run:
- prep_all
after_run: []
meta:
bitrise.io:
stack: osx-xcode-14.3.x-ventura
machine_type_id: g2-m1.8core
envs:
- DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12 mini,OS=16.4
test-builds-xcode-143:
steps:
- xcode-build-for-test@2:
Expand Down
2 changes: 1 addition & 1 deletion ci_scripts/screenshot_localization_tester.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ source ci_scripts/localization_vars.sh
LANGUAGE="ms-MY"

# Generate PaymentSheet screenshots
xcodebuild -quiet test -workspace "${script_dir}/../Stripe.xcworkspace" -scheme "PaymentSheetLocalizationScreenshotGenerator" -configuration "Debug" -derivedDataPath build-ci-tests -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 12 mini,OS=16.1" -resultBundlePath "${script_dir}/../build/loc_qa/${LANGUAGE}_payment_sheet" -testLanguage $LANGUAGE -testRegion $LANGUAGE
xcodebuild -quiet test -workspace "${script_dir}/../Stripe.xcworkspace" -scheme "PaymentSheetLocalizationScreenshotGenerator" -configuration "Debug" -derivedDataPath build-ci-tests -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 12 mini,OS=16.4" -resultBundlePath "${script_dir}/../build/loc_qa/${LANGUAGE}_payment_sheet" -testLanguage $LANGUAGE -testRegion $LANGUAGE
retVal=$?
if [ $retVal -ne 0 ]; then
exit 1
Expand Down
4 changes: 2 additions & 2 deletions stripe3ds2-support/ci_scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ function die {
}

# Execute tests
info "Executing tests (iPhone 12 mini @ iOS 16.1)..."
info "Executing tests (iPhone 12 mini @ iOS 16.4)..."

xcodebuild clean test \
-quiet \
-project "Stripe3DS2/Stripe3DS2.xcodeproj" \
-scheme "Stripe3DS2" \
-sdk "iphonesimulator" \
-destination "platform=iOS Simulator,name=iPhone 12 mini,OS=16.1"
-destination "platform=iOS Simulator,name=iPhone 12 mini,OS=16.4"

exit_code="${PIPESTATUS[0]}"

Expand Down

0 comments on commit 04bfde4

Please sign in to comment.