feat: Improvements to the products details page in the admin (#6994)

This commit is contained in:
Stevche Radevski
2024-04-07 17:52:47 +02:00
committed by GitHub
parent a24d6e6c97
commit f65fbff535
15 changed files with 507 additions and 7 deletions

View File

@@ -381,6 +381,30 @@ medusaIntegrationTestRunner({
)
})
it("returns a list of products where id is a list", async () => {
const response = await api
.get(
`/admin/products?id[]=${baseProduct.id},${proposedProduct.id}`,
adminHeaders
)
.catch((err) => {
console.log(err)
})
expect(response.status).toEqual(200)
expect(response.data.products).toHaveLength(2)
expect(response.data.products).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: baseProduct.id,
}),
expect.objectContaining({
id: proposedProduct.id,
}),
])
)
})
// TODO: Decide how this should be handled in v2
it.skip("returns a list of products filtered by discount condition id", async () => {
const resProd = await api.get("/admin/products", adminHeaders)