feat(dashboard): shipping management (#6995)
**What** - shipping flow - shipping profile pages - delete fulfillment set endpoint - delete shipping profile endpoint
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user