feat(core-flows,medusa,order): remove return shipping (#8137)

What:
* `DELETE /admin/returs/:id/shipping_methods/:action_id`

FIXES: CC-187
This commit is contained in:
Carlos R. L. Rodrigues
2024-07-16 10:27:16 +00:00
committed by GitHub
parent b7e6b1461b
commit 7123f9ff63
22 changed files with 383 additions and 23 deletions
@@ -268,6 +268,26 @@ medusaIntegrationTestRunner({
})
)
expect(result.data.order.shipping_methods).toHaveLength(2)
// remove shipping method
const action_id = result.data.order.shipping_methods[1].actions[0].id
result = await api.delete(
`/admin/returns/${returnId}/shipping-method/${action_id}`,
adminHeaders
)
expect(result.data.order_preview.shipping_methods).toHaveLength(1)
// recreate shipping
result = await api.post(
`/admin/returns/${returnId}/shipping-method`,
{
shipping_option_id: returnShippingOption.id,
},
adminHeaders
)
result = await api.post(
`/admin/returns/${returnId}/request`,
{},
@@ -184,7 +184,7 @@ medusaIntegrationTestRunner({
it("should successfully delete an order change", async () => {
await deleteOrderChangeWorkflow(container).run({
input: { id: orderChange.id },
input: { ids: orderChange.id },
})
const orderChange2 = await service.retrieveOrderChange(