feat(medusa): order changes endpoint (#8728)

What:
- `admin/orders/:id/changes` endpoint to get order changes related to the order
- added `*_by` attributes missing
This commit is contained in:
Carlos R. L. Rodrigues
2024-08-29 11:20:12 -03:00
committed by GitHub
parent 2a6c6fe590
commit b6521e4c1a
34 changed files with 182 additions and 22 deletions

View File

@@ -397,6 +397,17 @@ medusaIntegrationTestRunner({
expect(result.total).toEqual(34)
expect(result.items.length).toEqual(1)
result = (
await api.get(
`/admin/orders/${orderId}/changes?change_type=edit`,
adminHeaders
)
).data.order_changes
expect(result[0].actions).toHaveLength(3)
expect(result[0].status).toEqual("confirmed")
expect(result[0].confirmed_by).toEqual(expect.stringContaining("user_"))
})
})
},