Skip to content

Commit c7026ac

Browse files
authored
Merge branch 'trunk' into issue/8015-add-build-identifiers-to-jitm-request
2 parents a2128cb + 4b2accc commit c7026ac

File tree

56 files changed

+1349
-260
lines changed

Some content is hidden

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

56 files changed

+1349
-260
lines changed

.buildkite/cache-builder.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ common_params:
1010
- automattic/bash-cache#2.8.0
1111
- automattic/git-s3-cache#v1.1.3:
1212
bucket: "a8c-repo-mirrors"
13-
repo: "woocommerce/woocommerce-ios/"
13+
# This is not necessarily the actual name of the repo or the GitHub organization
14+
# it belongs to. It is the key used in the bucket, which is set based on
15+
# the Buildkite pipeline slug
16+
repo: "automattic/woocommerce-ios/"
1417
# Common environment values to use with the `env` key.
1518
- &common_env
1619
IMAGE_ID: xcode-14

.buildkite/pipeline.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ common_params:
55
- automattic/bash-cache#2.8.0
66
- automattic/git-s3-cache#v1.1.3:
77
bucket: "a8c-repo-mirrors"
8-
repo: "woocommerce/woocommerce-ios/"
8+
# This is not necessarily the actual name of the repo or the GitHub organization
9+
# it belongs to. It is the key used in the bucket, which is set based on
10+
# the Buildkite pipeline slug
11+
repo: "automattic/woocommerce-ios/"
912
# Common environment values to use with the `env` key.
1013
- &common_env
1114
IMAGE_ID: xcode-14

.buildkite/release-builds.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ common_params:
77
- automattic/bash-cache#2.8.0
88
- automattic/git-s3-cache#v1.1.3:
99
bucket: "a8c-repo-mirrors"
10-
repo: "woocommerce/woocommerce-ios/"
10+
# This is not necessarily the actual name of the repo or the GitHub organization
11+
# it belongs to. It is the key used in the bucket, which is set based on
12+
# the Buildkite pipeline slug
13+
repo: "automattic/woocommerce-ios/"
1114
# Common environment values to use with the `env` key.
1215
- &common_env
1316
IMAGE_ID: xcode-14

Experiments/Experiments/ABTest.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ public enum ABTest: String, CaseIterable {
1616
/// Experiment ref: pbxNRc-1S0-p2
1717
case aaTestLoggedOut = "woocommerceios_explat_aa_test_logged_out_202211"
1818

19+
/// A/B test to measure the sign-in success rate when only WPCom login is enabled.
20+
/// Experiment ref: pbxNRc-27s-p2
21+
///
22+
case abTestLoginWithWPComOnly = "woocommerceios_login_wpcom_only"
23+
24+
/// A/B test for the Products Onboarding banner on the My Store dashboard.
25+
/// Experiment ref: pbxNRc-26F-p2
26+
case productsOnboardingBanner = "woocommerceios_products_onboarding_first_product_banner"
27+
1928
/// Returns a variation for the given experiment
2029
public var variation: Variation {
2130
ExPlat.shared?.experiment(rawValue) ?? .control
@@ -26,9 +35,9 @@ public enum ABTest: String, CaseIterable {
2635
/// When adding a new experiment, add it to the appropriate case depending on its context (logged-in or logged-out experience).
2736
public var context: ExperimentContext {
2837
switch self {
29-
case .aaTestLoggedIn202210:
38+
case .aaTestLoggedIn202210, .productsOnboardingBanner:
3039
return .loggedIn
31-
case .aaTestLoggedOut:
40+
case .aaTestLoggedOut, .abTestLoginWithWPComOnly:
3241
return .loggedOut
3342
case .null:
3443
return .none

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
1818
case .shippingLabelsOnboardingM1:
1919
return buildConfig == .localDeveloper || buildConfig == .alpha
2020
case .newToWooCommerceLinkInLoginPrologue:
21-
return true
21+
return false
2222
case .loginPrologueOnboarding:
2323
return true
2424
case .loginErrorNotifications:
@@ -33,20 +33,12 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
3333
return true
3434
case .searchProductsBySKU:
3535
return true
36-
case .orderCreationSearchCustomers:
37-
return buildConfig == .localDeveloper || buildConfig == .alpha
3836
case .wpcomSignup:
39-
guard isFeatureFlagEnabled(.simplifiedLoginFlowI1) else {
40-
return buildConfig == .localDeveloper || buildConfig == .alpha
41-
}
42-
// To disable automatically sending signup link for unknown email IDs
4337
return false
4438
case .inAppPurchases:
4539
return buildConfig == .localDeveloper || buildConfig == .alpha
4640
case .storeCreationMVP:
47-
return buildConfig == .localDeveloper || buildConfig == .alpha
48-
case .simplifiedLoginFlowI1:
49-
return buildConfig == .localDeveloper || buildConfig == .alpha
41+
return true
5042
case .justInTimeMessagesOnDashboard:
5143
return true
5244
case .productsOnboarding:

Experiments/Experiments/FeatureFlag.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ public enum FeatureFlag: Int {
7070
///
7171
case searchProductsBySKU
7272

73-
/// Enables the Search Customers functionality in the Order Creation screen
74-
///
75-
case orderCreationSearchCustomers
76-
7773
/// Enables signing up for a WP.com account.
7874
///
7975
case wpcomSignup
@@ -86,11 +82,6 @@ public enum FeatureFlag: Int {
8682
///
8783
case storeCreationMVP
8884

89-
/// Temporary feature flag for the simplified login flow.
90-
/// TODO: replace with A/B testing.
91-
///
92-
case simplifiedLoginFlowI1
93-
9485
/// Just In Time Messages on Dashboard
9586
///
9687
case justInTimeMessagesOnDashboard

Fakes/Fakes/Networking.generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ extension Networking.Site {
15141514
isJetpackThePluginInstalled: .fake(),
15151515
isJetpackConnected: .fake(),
15161516
isWooCommerceActive: .fake(),
1517-
isWordPressStore: .fake(),
1517+
isWordPressComStore: .fake(),
15181518
jetpackConnectionActivePlugins: .fake(),
15191519
timezone: .fake(),
15201520
gmtOffset: .fake()

Networking/Networking/Model/Copiable/Models+Copiable.generated.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,7 @@ extension Networking.Site {
17891789
isJetpackThePluginInstalled: CopiableProp<Bool> = .copy,
17901790
isJetpackConnected: CopiableProp<Bool> = .copy,
17911791
isWooCommerceActive: CopiableProp<Bool> = .copy,
1792-
isWordPressStore: CopiableProp<Bool> = .copy,
1792+
isWordPressComStore: CopiableProp<Bool> = .copy,
17931793
jetpackConnectionActivePlugins: CopiableProp<[String]> = .copy,
17941794
timezone: CopiableProp<String> = .copy,
17951795
gmtOffset: CopiableProp<Double> = .copy
@@ -1804,7 +1804,7 @@ extension Networking.Site {
18041804
let isJetpackThePluginInstalled = isJetpackThePluginInstalled ?? self.isJetpackThePluginInstalled
18051805
let isJetpackConnected = isJetpackConnected ?? self.isJetpackConnected
18061806
let isWooCommerceActive = isWooCommerceActive ?? self.isWooCommerceActive
1807-
let isWordPressStore = isWordPressStore ?? self.isWordPressStore
1807+
let isWordPressComStore = isWordPressComStore ?? self.isWordPressComStore
18081808
let jetpackConnectionActivePlugins = jetpackConnectionActivePlugins ?? self.jetpackConnectionActivePlugins
18091809
let timezone = timezone ?? self.timezone
18101810
let gmtOffset = gmtOffset ?? self.gmtOffset
@@ -1820,7 +1820,7 @@ extension Networking.Site {
18201820
isJetpackThePluginInstalled: isJetpackThePluginInstalled,
18211821
isJetpackConnected: isJetpackConnected,
18221822
isWooCommerceActive: isWooCommerceActive,
1823-
isWordPressStore: isWordPressStore,
1823+
isWordPressComStore: isWordPressComStore,
18241824
jetpackConnectionActivePlugins: jetpackConnectionActivePlugins,
18251825
timezone: timezone,
18261826
gmtOffset: gmtOffset

Networking/Networking/Model/Site.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public struct Site: Decodable, Equatable, GeneratedFakeable, GeneratedCopiable {
4545
///
4646
public let isWooCommerceActive: Bool
4747

48-
/// Indicates if this site hosts a WordPress Store.
48+
/// Indicates if this site is hosted on WordPress.com.
4949
///
50-
public let isWordPressStore: Bool
50+
public let isWordPressComStore: Bool
5151

5252
/// For Jetpack CP sites (connected to Jetpack with Jetpack Connection Package instead of Jetpack-the-plugin), this property contains
5353
/// a list of active plugins with Jetpack Connection Package (e.g. WooCommerce Payments, Jetpack Backup).
@@ -75,7 +75,7 @@ public struct Site: Decodable, Equatable, GeneratedFakeable, GeneratedCopiable {
7575
let isJetpackConnected = try siteContainer.decode(Bool.self, forKey: .isJetpackConnected)
7676

7777
let optionsContainer = try siteContainer.nestedContainer(keyedBy: OptionKeys.self, forKey: .options)
78-
let isWordPressStore = try optionsContainer.decode(Bool.self, forKey: .isWordPressStore)
78+
let isWordPressComStore = try optionsContainer.decode(Bool.self, forKey: .isWordPressComStore)
7979
let isWooCommerceActive = try optionsContainer.decode(Bool.self, forKey: .isWooCommerceActive)
8080
let jetpackConnectionActivePlugins = try optionsContainer.decodeIfPresent([String].self, forKey: .jetpackConnectionActivePlugins) ?? []
8181
let timezone = try optionsContainer.decode(String.self, forKey: .timezone)
@@ -93,7 +93,7 @@ public struct Site: Decodable, Equatable, GeneratedFakeable, GeneratedCopiable {
9393
isJetpackThePluginInstalled: isJetpackThePluginInstalled,
9494
isJetpackConnected: isJetpackConnected,
9595
isWooCommerceActive: isWooCommerceActive,
96-
isWordPressStore: isWordPressStore,
96+
isWordPressComStore: isWordPressComStore,
9797
jetpackConnectionActivePlugins: jetpackConnectionActivePlugins,
9898
timezone: timezone,
9999
gmtOffset: gmtOffset)
@@ -111,7 +111,7 @@ public struct Site: Decodable, Equatable, GeneratedFakeable, GeneratedCopiable {
111111
isJetpackThePluginInstalled: Bool,
112112
isJetpackConnected: Bool,
113113
isWooCommerceActive: Bool,
114-
isWordPressStore: Bool,
114+
isWordPressComStore: Bool,
115115
jetpackConnectionActivePlugins: [String],
116116
timezone: String,
117117
gmtOffset: Double) {
@@ -124,7 +124,7 @@ public struct Site: Decodable, Equatable, GeneratedFakeable, GeneratedCopiable {
124124
self.plan = plan
125125
self.isJetpackThePluginInstalled = isJetpackThePluginInstalled
126126
self.isJetpackConnected = isJetpackConnected
127-
self.isWordPressStore = isWordPressStore
127+
self.isWordPressComStore = isWordPressComStore
128128
self.isWooCommerceActive = isWooCommerceActive
129129
self.jetpackConnectionActivePlugins = jetpackConnectionActivePlugins
130130
self.timezone = timezone
@@ -156,7 +156,7 @@ private extension Site {
156156
}
157157

158158
enum OptionKeys: String, CodingKey {
159-
case isWordPressStore = "is_wpcom_store"
159+
case isWordPressComStore = "is_wpcom_store"
160160
case isWooCommerceActive = "woocommerce_is_active"
161161
case timezone = "timezone"
162162
case gmtOffset = "gmt_offset"

Networking/Networking/Settings/Settings.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ public struct Settings {
1010
public static var wordpressApiBaseURL: String = {
1111
if ProcessInfo.processInfo.arguments.contains("mocked-wpcom-api") {
1212
return "http://localhost:8282/"
13+
} else if let wpComApiBaseURL = ProcessInfo.processInfo.environment["wpcom-api-base-url"] {
14+
return wpComApiBaseURL
1315
}
1416

1517
return "https://public-api.wordpress.com/"

0 commit comments

Comments
 (0)