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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user