Skip to content

Commit

Permalink
Merge branch 'develop' into fix/hover-states
Browse files Browse the repository at this point in the history
  • Loading branch information
srindom authored Oct 9, 2024
2 parents 35fce1f + 7ec1743 commit 6699a13
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,20 @@ medusaIntegrationTestRunner({
expect(res.status).toEqual(200)
expect(res.data.product_types).toEqual(
expect.arrayContaining([
expect.objectContaining({
{
id: expect.stringMatching(/ptyp_.{24}/),
value: "test1",
}),
expect.objectContaining({
created_at: expect.any(String),
updated_at: expect.any(String),
metadata: null,
},
{
id: expect.stringMatching(/ptyp_.{24}/),
value: "test2",
}),
created_at: expect.any(String),
updated_at: expect.any(String),
metadata: null,
},
])
)
})
Expand All @@ -61,13 +69,35 @@ medusaIntegrationTestRunner({

// The value of the type should match the search param
expect(res.data.product_types).toEqual([
expect.objectContaining({
{
id: expect.stringMatching(/ptyp_.{24}/),
value: "test1",
}),
created_at: expect.any(String),
updated_at: expect.any(String),
metadata: null,
},
])
})

// BREAKING: Removed a test around filtering based on discount condition id, which is no longer supported
})

describe("/admin/product-types/:id", () => {
it("returns a product type", async () => {
const res = await api.get(
`/admin/product-types/${type1.id}`,
adminHeaders
)

expect(res.status).toEqual(200)
expect(res.data.product_type).toEqual({
id: expect.stringMatching(/ptyp_.{24}/),
value: "test1",
created_at: expect.any(String),
updated_at: expect.any(String),
metadata: null,
})
})
})
},
})
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const defaultAdminProductTypeFields = [
"value",
"created_at",
"updated_at",
"metadata",
]

export const retrieveProductTypeTransformQueryConfig = {
Expand Down

0 comments on commit 6699a13

Please sign in to comment.