fix(core-flows): cart validate sales channel (#11024)

This commit is contained in:
Frane Polić
2025-01-18 16:48:58 +01:00
committed by GitHub
parent 45847fef19
commit c1385c7002
4 changed files with 35 additions and 34 deletions

View File

@@ -313,32 +313,6 @@ medusaIntegrationTestRunner({
)
})
it("should throw when required fields of a cart are not present", async () => {
cart = (
await api.post(
`/store/carts`,
{
region_id: region.id,
currency_code: "usd",
sales_channel_id: null,
email: "test@admin.com",
items: [],
},
storeHeaders
)
).data.cart
const { response } = await api
.get(`/store/shipping-options?cart_id=${cart.id}`, storeHeaders)
.catch((e) => e)
expect(response.data).toEqual({
type: "invalid_data",
message:
"Field(s) are required to have value to continue - sales_channel_id",
})
})
it("should throw error when cart_id is not passed as a parameter", async () => {
const { response } = await api
.get(`/store/shipping-options`, storeHeaders)