Skip to content

Commit

Permalink
feat(core-flows): calculate SO price on cart ops (medusajs#10563)
Browse files Browse the repository at this point in the history
**What**
- calculate the shipping option price when creating a shipping method
- calculate the shipping option price when refreshing cart
- add testing for calculated SO flow
- fix validation on calculated SO creation
- add manual fulfillment provider for testing
- add `from_location` to calculation context

---

RESOLVES CMRC-778
RESOLVES CMRC-602
RESOLVES SUP-136
  • Loading branch information
fPolic authored Dec 16, 2024
1 parent 95baacf commit 0c49470
Show file tree
Hide file tree
Showing 21 changed files with 903 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,18 @@ medusaIntegrationTestRunner({
)

expect(response.status).toEqual(200)
expect(response.data.fulfillment_providers).toEqual([
expect.objectContaining({
id: "manual_test-provider",
is_enabled: true,
}),
])
expect(response.data.fulfillment_providers).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: "manual_test-provider",
is_enabled: true,
}),
expect.objectContaining({
id: "manual-calculated_test-provider-calculated",
is_enabled: true,
}),
])
)
})

it("should list all fulfillment providers scoped by stock location", async () => {
Expand Down
Loading

0 comments on commit 0c49470

Please sign in to comment.