feat(core-flows): cart complete shipping validate (#10984)

**What**
- validate that there is a shipping method if any of the line items have requires_shipping=true
- validate that products shipping profile is supported by a shipping method on the cart
- update tests

---

CLOSES CMRC-683
This commit is contained in:
Frane Polić
2025-02-04 11:10:08 +01:00
committed by GitHub
parent 3cf4307296
commit 462c3e8057
9 changed files with 512 additions and 118 deletions

View File

@@ -266,6 +266,7 @@ medusaIntegrationTestRunner({
const inventoryItem = await inventoryModule.createInventoryItems({
sku: "inv-1234",
requires_shipping: false,
})
await inventoryModule.createInventoryLevels([
@@ -743,7 +744,7 @@ medusaIntegrationTestRunner({
title: "Test item",
subtitle: "Test subtitle",
thumbnail: "some-url",
requires_shipping: true,
requires_shipping: false,
is_discountable: false,
is_tax_inclusive: false,
unit_price: 3000,
@@ -825,7 +826,7 @@ medusaIntegrationTestRunner({
precision: 20,
value: "3000",
},
requires_shipping: true,
requires_shipping: false,
subtitle: "Test subtitle",
thumbnail: "some-url",
title: "Test item",

View File

@@ -1161,6 +1161,7 @@ medusaIntegrationTestRunner({
`/admin/inventory-items`,
{
sku: "12345",
requires_shipping: false,
},
adminHeaders
)