fix(orchestration): Ids wrongly processed when using operators map (#9781)
* fix(orchestration): Ids processing when using operators map * fix(orchestration): Ids processing when using operators map * address feedback * address feedback
This commit is contained in:
committed by
GitHub
parent
b9c787ac2b
commit
f295596df2
@@ -205,6 +205,7 @@ medusaIntegrationTestRunner({
|
||||
query = appContainer.resolve(ContainerRegistrationKeys.QUERY)
|
||||
})
|
||||
|
||||
let product
|
||||
beforeEach(async () => {
|
||||
await createAdminUser(dbConnection, adminHeaders, appContainer)
|
||||
|
||||
@@ -224,11 +225,13 @@ medusaIntegrationTestRunner({
|
||||
],
|
||||
}
|
||||
|
||||
await api
|
||||
const res = await api
|
||||
.post("/admin/products", payload, adminHeaders)
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
product = res.data.product
|
||||
})
|
||||
|
||||
it(`should throw if not exists`, async () => {
|
||||
@@ -265,6 +268,25 @@ medusaIntegrationTestRunner({
|
||||
)
|
||||
})
|
||||
|
||||
it(`should support filtering using operators on a primary column`, async () => {
|
||||
const { data } = await query.graph({
|
||||
entity: "product",
|
||||
fields: ["id", "title"],
|
||||
filters: {
|
||||
id: {
|
||||
$in: [product.id],
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
expect(data).toEqual([
|
||||
expect.objectContaining({
|
||||
id: product.id,
|
||||
title: product.title,
|
||||
}),
|
||||
])
|
||||
})
|
||||
|
||||
it(`should perform cross module query and apply filters correctly to the correct modules [1]`, async () => {
|
||||
const { data } = await query.graph({
|
||||
entity: "product",
|
||||
|
||||
Reference in New Issue
Block a user