fix(core-flows,order): update action (#8333)

This commit is contained in:
Carlos R. L. Rodrigues
2024-07-29 12:51:51 -03:00
committed by GitHub
parent 42c80e4264
commit ed67d44d28
19 changed files with 124 additions and 36 deletions
@@ -383,8 +383,8 @@ medusaIntegrationTestRunner({
)
})
describe("Returns lifecycle", () => {
it.only("Full flow with 2 orders", async () => {
describe("Claims lifecycle", () => {
it("Full flow with 2 orders", async () => {
let result = await api.post(
"/admin/claims",
{
@@ -909,6 +909,24 @@ medusaIntegrationTestRunner({
})
)
const receiveItemActionId =
result.data.order_preview.items[0].actions[0].id
// invalid update (quantity 0)
result = await api
.post(
`/admin/returns/${returnId}/receive-items/${receiveItemActionId}`,
{
quantity: 0,
},
adminHeaders
)
.catch((e) => e)
expect(result.response.data.message).toEqual(
`Quantity to receive return of item ${item.id} is required.`
)
result = await api.post(
`/admin/returns/${returnId}/dismiss-items`,
{