feat(dashboard): shipping management (#6995)

**What**
- shipping flow
- shipping profile pages
- delete fulfillment set endpoint
- delete shipping profile endpoint
This commit is contained in:
Frane Polić
2024-04-16 13:42:56 +00:00
committed by GitHub
parent c3260a2c5a
commit 0a9b9b073d
62 changed files with 2501 additions and 12 deletions
@@ -35,7 +35,7 @@ medusaIntegrationTestRunner({
})
describe("Admin - Shipping Profiles", () => {
// TODO: Missing update and delete tests
// TODO: Missing update tests
it("should test the entire lifecycle of a shipping profile", async () => {
const payload = {
name: "test-profile-2023",
@@ -84,6 +84,23 @@ medusaIntegrationTestRunner({
created_at: expect.any(String),
})
)
const { data } = await api.delete(
`/admin/shipping-profiles/${shipping_profile.id}`,
adminHeaders
)
expect(data).toEqual({
id: retrievedProfile.id,
object: "shipping_profile",
deleted: true,
})
await api
.get(`/admin/shipping-profiles/${shipping_profile.id}`, adminHeaders)
.catch((err) => {
expect(err.response.status).toEqual(404)
})
})
})
@@ -205,7 +222,6 @@ medusaIntegrationTestRunner({
})
describe("DELETE /admin/shipping-profiles", () => {
// TODO: Delete is not added yet
it("deletes a shipping profile", async () => {
expect.assertions(2)