-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
feat(core-flows): cart complete shipping validate #10984
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
|
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.
LGTM, nice
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.
LGTM
b31a556
to
223ac2b
Compare
@@ -932,6 +932,7 @@ medusaIntegrationTestRunner({ | |||
.post( | |||
`/admin/orders/${order.id}/fulfillments`, | |||
{ | |||
shipping_option_id: seeder.shippingOption.id, // shipping option with the "regular" shipping profile |
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.
question: This still optional at the HTTP level right? Why did we need to add this here?
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.
Yes, it's optional. In this test, the cart has 2 shipping methods for supporting 2 different shipping profiles that products in the cart have. So when creating fulfilment here we want to specify which method is used to heave deterministic behaviour in the test (otherwise shipping_methods[0]
would be used which is non determinsitic).
This test checks if shipping method for fulfilment supports shipping profile of the items that are being fulfilled but the cart previously had only one shipping method with one shipping profile and the item in cart had another profile.
This PR introduced a validation that a cart cannot be completed if there isn't a shipping method for every shipping profile in the cart so now for the order seeder to work and complete the cart we needed to modify the test so 2 methods are on the cart and needed to specify which one is used for fulfillment in this case.
What
CLOSES CMRC-683