Skip to content

Commit eb915df

Browse files
committed
expand test
1 parent ca3124d commit eb915df

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

integration-tests/http/__tests__/promotions/admin/promotions.spec.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3758,7 +3758,7 @@ medusaIntegrationTestRunner({
37583758
}),
37593759
expect.objectContaining({
37603760
id: "product_variant",
3761-
value: "items.variant_id",
3761+
value: "items.variant.id",
37623762
label: "Product Variant",
37633763
required: false,
37643764
field_type: "multiselect",
@@ -4091,6 +4091,22 @@ medusaIntegrationTestRunner({
40914091
])
40924092
)
40934093

4094+
response = await api.get(
4095+
`/admin/promotions/rule-value-options/target-rules/product_variant`,
4096+
adminHeaders
4097+
)
4098+
4099+
expect(response.status).toEqual(200)
4100+
expect(response.data.values.length).toEqual(4) // 2 products × 2 variants each
4101+
expect(response.data.values).toEqual(
4102+
expect.arrayContaining([
4103+
expect.objectContaining({ value: product1.variants[0].id }),
4104+
expect.objectContaining({ value: product1.variants[1].id }),
4105+
expect.objectContaining({ value: product2.variants[0].id }),
4106+
expect.objectContaining({ value: product2.variants[1].id }),
4107+
])
4108+
)
4109+
40944110
const soType1 = (
40954111
await api.post(
40964112
"/admin/shipping-option-types",

0 commit comments

Comments
 (0)