Skip to content

Commit

Permalink
[SiOC - customer creation] Disable feature flag as the feature is pau…
Browse files Browse the repository at this point in the history
…sed (#14363)
  • Loading branch information
jaclync authored Nov 12, 2024
2 parents cb4e6bd + 3df8ec4 commit 9a9b909
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Experiments/Experiments/DefaultFeatureFlagService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
case .subscriptionsInOrderCreationUI:
return buildConfig == .localDeveloper || buildConfig == .alpha
case .subscriptionsInOrderCreationCustomers:
return (buildConfig == .localDeveloper || buildConfig == .alpha) && !isUITesting
// Feature paused pfoUAQ-zw-p2#comment-510.
return false
case .pointOfSale:
return buildConfig == .localDeveloper || buildConfig == .alpha
case .googleAdsCampaignCreationOnWebView:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class EditOrderFormTests: XCTestCase {
// Then
XCTAssertNotNil(try? sut.find(button: "Add Products"))
XCTAssertNotNil(try? sut.find(button: "Add Custom Amount"))
XCTAssertNotNil(try? sut.find(button: "Add Customer"))
XCTAssertNotNil(try? sut.find(button: "Add Customer Details"))
XCTAssertNotNil(try? sut.find(button: "Add Note"))
XCTAssertNotNil(try? sut.find(button: "Done"))
}
Expand All @@ -38,7 +38,7 @@ final class EditOrderFormTests: XCTestCase {
XCTAssertNotNil(try? sut.find(button: "Add Custom Amount"))
XCTAssertNotNil(try? sut.find(button: "Add Shipping"))
XCTAssertNotNil(try? sut.find(button: "Add Coupon"))
XCTAssertNotNil(try? sut.find(button: "Add Customer"))
XCTAssertNotNil(try? sut.find(button: "Add Customer Details"))
XCTAssertNotNil(try? sut.find(button: "Add Note"))
XCTAssertNotNil(try? sut.find(button: "Done"))
}
Expand All @@ -56,7 +56,7 @@ final class EditOrderFormTests: XCTestCase {

XCTAssertNotNil(try? sut.find(viewWithAccessibilityLabel: "Edit amount"))
XCTAssertNotNil(try? sut.find(button: "Add Shipping"))
XCTAssertNotNil(try? sut.find(button: "Add Customer"))
XCTAssertNotNil(try? sut.find(button: "Add Customer Details"))
XCTAssertNotNil(try? sut.find(button: "Add Note"))
XCTAssertNotNil(try? sut.find(button: "Done"))
}
Expand All @@ -74,7 +74,7 @@ final class EditOrderFormTests: XCTestCase {
XCTAssertNotNil(try? sut.find(text: "Order total"))

XCTAssertNotNil(try? sut.find(viewWithAccessibilityLabel: "Edit shipping"))
XCTAssertNotNil(try? sut.find(viewWithAccessibilityLabel: "Search customer"))
XCTAssertNotNil(try? sut.find(viewWithAccessibilityLabel: "Edit Customer Details"))

XCTAssertNotNil(try? sut.find(button: "Add Products"))
XCTAssertNotNil(try? sut.find(button: "Add Custom Amount"))
Expand All @@ -97,7 +97,7 @@ final class EditOrderFormTests: XCTestCase {

XCTAssertNotNil(try? sut.find(button: "Add Products"))
XCTAssertNotNil(try? sut.find(button: "Add Custom Amount"))
XCTAssertNotNil(try? sut.find(button: "Add Customer"))
XCTAssertNotNil(try? sut.find(button: "Add Customer Details"))
XCTAssertNotNil(try? sut.find(button: "Done"))
}
}
Expand All @@ -107,6 +107,7 @@ private extension EditOrderFormTests {
static func createEditView(with order: Order) -> OrderForm {
let stores = MockStoresManager(sessionManager: .testingInstance)
let storage = MockStorageManager()
let featureFlagService = MockFeatureFlagService(isSubscriptionsInOrderCreationCustomersEnabled: false)

// Insert products that relates to items into the storage.
// This is needed by EditableOrderViewModel to properly compute its variables
Expand All @@ -118,7 +119,8 @@ private extension EditOrderFormTests {
let viewModel = EditableOrderViewModel(siteID: order.siteID,
flow: .editing(initialOrder: order),
stores: stores,
storageManager: storage)
storageManager: storage,
featureFlagService: featureFlagService)
return OrderForm(flow: .editing, viewModel: viewModel, presentProductSelector: {})
}

Expand Down

0 comments on commit 9a9b909

Please sign in to comment.