-
Notifications
You must be signed in to change notification settings - Fork 121
Add tracks for Customer Search #7907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bcb8d16
Add tracks for customer search
iamgabrielma aed6852
Merge branch 'trunk' into issue/7741-add-customer-search-tracks
iamgabrielma d350d31
Merge branch 'trunk' into issue/7741-add-customer-search-tracks
iamgabrielma bb884ed
Add tracks to customer search
iamgabrielma 6aace88
Remove feature flag
iamgabrielma 6670176
Update release notes
iamgabrielma 56582c0
Move orderCreationCustomerSearch track outside success case
iamgabrielma f20e20f
Add test for orderCreationCustomerSearch track
iamgabrielma 1ed53af
Add test for orderCreationCustomerAdded track
iamgabrielma 6a326f7
Simplify track event call
iamgabrielma 2be5053
Make orderCreationCustomerSearch event test clearer
iamgabrielma 169094d
Make orderCreationCustomerAdded track test more solid
iamgabrielma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,10 +70,6 @@ public enum FeatureFlag: Int { | |
| /// | ||
| case searchProductsBySKU | ||
|
|
||
| /// Enables the Search Customers functionality in the Order Creation screen | ||
| /// | ||
| case orderCreationSearchCustomers | ||
|
|
||
|
Comment on lines
-73
to
-76
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well remembered |
||
| /// Enables signing up for a WP.com account. | ||
| /// | ||
| case wpcomSignup | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -701,6 +701,25 @@ final class EditOrderAddressFormViewModelTests: XCTestCase { | |
| assertEqual(analyticsProvider.receivedProperties.first?["subject"] as? String, "billing_address") | ||
| } | ||
|
|
||
| func test_view_model_when_customerSelectedFromSearch_then_tracks_orderCreationCustomerAdded() { | ||
| // Given | ||
| let analyticsProvider = MockAnalyticsProvider() | ||
| let viewModel = EditOrderAddressFormViewModel(order: Order.fake(), type: .billing, analytics: WooAnalytics(analyticsProvider: analyticsProvider)) | ||
| let customer = Customer.fake().copy( | ||
| email: "[email protected]", | ||
| firstName: "Johnny", | ||
| lastName: "Appleseed", | ||
| billing: sampleAddressWithEmptyNullableFields(), | ||
| shipping: sampleAddressWithEmptyNullableFields() | ||
| ) | ||
|
|
||
| // When | ||
| viewModel.customerSelectedFromSearch(customer: customer) | ||
|
|
||
| // Then | ||
| XCTAssert(analyticsProvider.receivedEvents.contains("order_creation_customer_added")) | ||
| } | ||
|
|
||
| func test_view_model_fires_error_notice_when_providing_an_invalid_email() { | ||
| // Given | ||
| let viewModel = EditOrderAddressFormViewModel(order: Order.fake(), type: .billing) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked a release build, and the feature is enabled there 👍