Skip to content

Commit 5688454

Browse files
committed
Merge branch 'trunk' into xcode-14
2 parents f22b616 + 5c17789 commit 5688454

File tree

449 files changed

+14479
-3248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

449 files changed

+14479
-3248
lines changed

.buildkite/commands/run-ui-tests.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ IOS_VERSION=$3
66

77
echo "Running $TEST_NAME on $DEVICE for iOS $IOS_VERSION"
88

9+
# Run this at the start to fail early if value not available
10+
echo '--- :test-analytics: Configuring Test Analytics'
11+
if [[ $DEVICE =~ ^iPhone ]]; then
12+
export BUILDKITE_ANALYTICS_TOKEN=$BUILDKITE_ANALYTICS_TOKEN_UI_TESTS_IPHONE
13+
else
14+
export BUILDKITE_ANALYTICS_TOKEN=$BUILDKITE_ANALYTICS_TOKEN_UI_TESTS_IPAD
15+
fi
16+
917
# Workaround for https://github.com/Automattic/buildkite-ci/issues/79
1018
echo "--- :rubygems: Fixing Ruby Setup"
1119
gem install bundler

.buildkite/commands/run-unit-tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash -eu
22

3+
# Run this at the start to fail early if value not available
4+
echo '--- :test-analytics: Configuring Test Analytics'
5+
export BUILDKITE_ANALYTICS_TOKEN=$BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS
6+
37
echo "--- 📦 Downloading Build Artifacts"
48
buildkite-agent artifact download build-products.tar .
59
tar -xf build-products.tar

.rubocop.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
1+
AllCops:
2+
Exclude:
3+
- DerivedData/**/*
4+
- Pods/**/*
5+
- vendor/**/*
6+
NewCops: enable
7+
18
Metrics/BlockLength:
29
Exclude:
310
- fastlane/Fastfile
411

12+
Metrics/MethodLength:
13+
Max: 20
14+
515
Style/AsciiComments:
616
Exclude:
717
- fastlane/Fastfile
818

919
Layout/LineLength:
1020
Exclude:
1121
- fastlane/Fastfile
22+
- Podfile
1223

1324
Naming/FileName:
1425
Exclude:

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!--
2+
Contains editorialized release notes. Raw release notes should go into `RELEASE-NOTES.txt`.
3+
-->
4+
5+
## 10.1
6+
This release has several fixes that makes it easier for you to take payments from the app. We’ve also added a new Help Center FAQ page that makes it easier for you to login to the app.
7+
Please continue to send us feedback – we are listening!
8+
9+
## 10.0
10+
We made it much easier to find everything about accepting payments in the app. Head on to the Payments section from the Menu! We also fixed an issue where you might be unnecessarily blocked from taking payments.
11+
We also made various enhancements to our login flows to help you get started quickly with the app.
12+
Lastly, we’ve made some tweaks to performance. But we’re not done. Look forward to more improvements in the future. Please keep sending your feedback!
13+
14+
## 9.9
15+
This release has a few improvements to your login experience, including the option to use your `wp-admin` site credentials and magic link option to login. Please continue to send us feedback – we are listening!

CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/WooCommerce/UITestsFoundation/ @woocommerce/mobile-ui-testing-squad
2+
/WooCommerce/WooCommerceUITests/ @woocommerce/mobile-ui-testing-squad
3+
/WooCommerce/WooCommerceScreenshots/ @woocommerce/mobile-ui-testing-squad

Experiments/Experiments/ABTest.swift

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,56 @@ public enum ABTest: String, CaseIterable {
77
/// `An enum with no cases cannot declare a raw type`
88
case null
99

10+
/// A/A test for ExPlat integration in the logged in state.
11+
/// Experiment ref: pbxNRc-1QS-p2
12+
///
13+
case aaTest202209 = "woocommerceios_explat_aa_test_logged_in_202209"
14+
15+
/// A/A test to make sure there is no bias in the logged out state.
16+
/// Experiment ref: pbxNRc-1S0-p2
17+
case aaTestLoggedOut202208 = "woocommerceios_explat_aa_test_logged_out_202208"
18+
19+
/// A/B test for promoting linked products in Product Details.
20+
/// Experiment ref: pbxNRc-1Pp-p2
21+
case linkedProductsPromo = "woocommerceios_product_details_linked_products_banner"
22+
23+
/// A/B test for the login button order on the prologues screen.
24+
/// Experiment ref: pbxNRc-1VA-p2
25+
case loginPrologueButtonOrder = "woocommerceios_login_prologue_button_order"
26+
1027
/// Returns a variation for the given experiment
11-
var variation: Variation {
12-
return ExPlat.shared?.experiment(self.rawValue) ?? .control
28+
public var variation: Variation {
29+
ExPlat.shared?.experiment(rawValue) ?? .control
1330
}
1431
}
1532

1633
public extension ABTest {
1734
/// Start the AB Testing platform if any experiment exists
1835
///
19-
static func start() {
20-
guard ABTest.allCases.count > 1 else {
21-
return
22-
}
36+
static func start() async {
37+
await withCheckedContinuation { continuation in
38+
guard ABTest.allCases.count > 1 else {
39+
return continuation.resume(returning: ())
40+
}
2341

24-
let experimentNames = ABTest.allCases.filter { $0 != .null }.map { $0.rawValue }
25-
ExPlat.shared?.register(experiments: experimentNames)
42+
let experimentNames = ABTest.allCases.filter { $0 != .null }.map { $0.rawValue }
43+
ExPlat.shared?.register(experiments: experimentNames)
2644

27-
ExPlat.shared?.refresh()
45+
ExPlat.shared?.refresh {
46+
continuation.resume(returning: ())
47+
}
48+
} as Void
49+
}
50+
}
51+
52+
public extension Variation {
53+
/// Used in an analytics event property value.
54+
var analyticsValue: String {
55+
switch self {
56+
case .control:
57+
return "control"
58+
case .treatment(let string):
59+
return string.map { "treatment: \($0)" } ?? "treatment"
60+
}
2861
}
2962
}

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
77
switch featureFlag {
88
case .barcodeScanner:
99
return buildConfig == .localDeveloper || buildConfig == .alpha
10-
case .orderListFilters:
11-
return true
1210
case .jetpackConnectionPackageSupport:
1311
return true
1412
case .hubMenu:
@@ -35,10 +33,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
3533
return buildConfig == .localDeveloper || buildConfig == .alpha
3634
case .shippingLabelsOnboardingM1:
3735
return buildConfig == .localDeveloper || buildConfig == .alpha
38-
case .inPersonPaymentGatewaySelection:
39-
return true
40-
case .unifiedOrderEditing:
41-
return true
4236
case .backgroundProductImageUpload:
4337
return true
4438
case .appleIDAccountDeletion:
@@ -48,7 +42,15 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
4842
case .loginPrologueOnboarding:
4943
return true
5044
case .loginErrorNotifications:
51-
return buildConfig == .localDeveloper || buildConfig == .alpha
45+
return true
46+
case .loginPrologueOnboardingSurvey:
47+
return true
48+
case .loginMagicLinkEmphasis:
49+
return true
50+
case .loginMagicLinkEmphasisM2:
51+
return true
52+
case .promptToEnableCodInIppOnboarding:
53+
return true
5254
default:
5355
return true
5456
}

Experiments/Experiments/FeatureFlag.swift

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ public enum FeatureFlag: Int {
1414
///
1515
case reviews
1616

17-
/// Display the bar for displaying the filters in the Order List
18-
///
19-
case orderListFilters
20-
2117
/// Allows sites with plugins that include Jetpack Connection Package and without Jetpack-the-plugin to connect to the app
2218
///
2319
case jetpackConnectionPackageSupport
@@ -70,14 +66,6 @@ public enum FeatureFlag: Int {
7066
///
7167
case shippingLabelsOnboardingM1
7268

73-
/// Enable selection of payment gateway to use for In-Person Payments when there is more than one available
74-
///
75-
case inPersonPaymentGatewaySelection
76-
77-
/// Enable order editing from the order detailed screen.
78-
///
79-
case unifiedOrderEditing
80-
8169
/// Enable image upload after leaving the product form
8270
///
8371
case backgroundProductImageUpload
@@ -101,4 +89,20 @@ public enum FeatureFlag: Int {
10189
/// Local notifications scheduled 24 hours after certain login errors
10290
///
10391
case loginErrorNotifications
92+
93+
/// Whether to show a survey at the end of the login onboarding screen after feature carousel
94+
///
95+
case loginPrologueOnboardingSurvey
96+
97+
/// Whether to prefer magic link to password in the login flow
98+
///
99+
case loginMagicLinkEmphasis
100+
101+
/// Whether to show the magic link as a secondary button instead of a table view cell on the password screen
102+
///
103+
case loginMagicLinkEmphasisM2
104+
105+
/// Whether to include the Cash on Delivery enable step in In-Person Payment onboarding
106+
///
107+
case promptToEnableCodInIppOnboarding
104108
}

Fakes/Fakes/Networking.generated.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,18 @@ extension PaymentGateway {
579579
title: .fake(),
580580
description: .fake(),
581581
enabled: .fake(),
582-
features: .fake()
582+
features: .fake(),
583+
instructions: .fake()
584+
)
585+
}
586+
}
587+
extension PaymentGateway.Setting {
588+
/// Returns a "ready to use" type filled with fake values.
589+
///
590+
public static func fake() -> PaymentGateway.Setting {
591+
.init(
592+
settingID: .fake(),
593+
value: .fake()
583594
)
584595
}
585596
}

0 commit comments

Comments
 (0)