-
Notifications
You must be signed in to change notification settings - Fork 121
[Woo POS] Fix two failing analytics tests #16083
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 3 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1c567f6
Fix two failing analytics tests
joshheald e273f5d
Merge branch 'trunk' into task/fix-receipt-eligibility-analytics-test
joshheald c0c889f
Prevent cha-ching sound in POSOrderControllerTests
joshheald 858dad3
Update to fastlane 2.228
joshheald 7716d31
Newline to force tests to run
joshheald 8191f9a
Print statements for debugging on CI
joshheald 1aad573
Debugging additions for eligibility
joshheald 3c00a14
Force feature flag state
joshheald 30ed960
Comma fix
joshheald 8405d9a
Use mock feature flag service in all receipt tests
joshheald c114e69
Revert "Newline to force tests to run"
joshheald f58d22d
Revert "Print statements for debugging on CI"
joshheald 928cf93
Revert "Debugging additions for eligibility"
joshheald a48f878
Update analytics tests for POS cash payment flow
joshheald 94d00e7
Clear prior-logged properties which could break the tests
joshheald 8990b01
Merge branch 'trunk' into task/fix-receipt-eligibility-analytics-test
joshheald 178b11f
Merge branch 'task/fix-receipt-eligibility-analytics-test' into task/…
joshheald b1ca363
Update gems to fix CI reporting of Swift Testing failures (#16088)
joshheald 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -220,7 +220,8 @@ struct PointOfSaleOrderControllerTests { | |
| do { | ||
| // Given/When | ||
| let sut = PointOfSaleOrderController(orderService: mockOrderService, | ||
| receiptService: mockReceiptService) | ||
| receiptService: mockReceiptService, | ||
| celebration: MockPaymentCaptureCelebration()) | ||
| try await sut.collectCashPayment(changeDueAmount: nil) | ||
| } catch let error as PointOfSaleOrderController.PointOfSaleOrderControllerError { | ||
| // Then | ||
|
|
@@ -253,7 +254,8 @@ struct PointOfSaleOrderControllerTests { | |
| @Test func collectCashPayment_passes_changeDueAmount_to_order_service() async throws { | ||
| // Given | ||
| let sut = PointOfSaleOrderController(orderService: mockOrderService, | ||
| receiptService: mockReceiptService) | ||
| receiptService: mockReceiptService, | ||
| celebration: MockPaymentCaptureCelebration()) | ||
|
|
||
| let orderItem = OrderItem.fake() | ||
| let fakeOrder = Order.fake().copy(items: [orderItem]) | ||
|
|
@@ -600,7 +602,8 @@ struct PointOfSaleOrderControllerTests { | |
|
|
||
| let sut = PointOfSaleOrderController(orderService: orderService, | ||
| receiptService: MockReceiptService(), | ||
| analytics: mockAnalytics) | ||
| analytics: mockAnalytics, | ||
| celebration: MockPaymentCaptureCelebration()) | ||
|
|
||
| // In order to test the order controller failure we need to succeed first in creating a successful order: | ||
| let orderItem = OrderItem.fake() | ||
|
|
@@ -638,6 +641,7 @@ struct PointOfSaleOrderControllerTests { | |
|
|
||
| // We need an existing order before we can send a receipt | ||
| await sut.syncOrder(for: .init(purchasableItems: [makeItem()]), retryHandler: { }) | ||
| analyticsProvider.receivedEvents.removeAll() | ||
|
|
||
| // When | ||
| try await sut.sendReceipt(recipientEmail: "[email protected]") | ||
|
|
@@ -683,6 +687,7 @@ struct PointOfSaleOrderControllerTests { | |
|
|
||
| // We need an existing order before we can send a receipt | ||
| await sut.syncOrder(for: .init(purchasableItems: [makeItem()]), retryHandler: { }) | ||
| analyticsProvider.receivedEvents.removeAll() | ||
joshheald marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // When | ||
| do { | ||
|
|
||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.