Skip to content

Commit

Permalink
chore(presets): fix predicate (#492)
Browse files Browse the repository at this point in the history
* chore(td): fix predicate

* chore(td): generate changeset
  • Loading branch information
jaikamat authored Feb 26, 2024
1 parent 1c41c10 commit 689978c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/tasty-scissors-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@commercetools-test-data/cart-discount': patch
---

Fixes B2B cart discount predicate preset
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe(`with towerCranesBogo preset`, () => {
"target": {
"discountedQuantity": 1,
"maxOccurrence": undefined,
"predicate": "categories.key contains "tower-cranes",
"predicate": "categories.key contains "tower-cranes"",
"selectionMode": "Cheapest",
"triggerQuantity": 2,
"type": "multiBuyLineItems",
Expand Down Expand Up @@ -161,7 +161,7 @@ describe(`with towerCranesBogo preset`, () => {
"multiBuyLineItems": {
"discountedQuantity": 1,
"maxOccurrence": undefined,
"predicate": "categories.key contains "tower-cranes",
"predicate": "categories.key contains "tower-cranes"",
"selectionMode": "Cheapest",
"triggerQuantity": 2,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const towerCranesBogo = (): TCartDiscountDraftBuilder =>
.target(
CartDiscountMultiBuyLineItemsTargetDraft.presets
.empty()
.predicate(`categories.key contains "${category.key}`)
.predicate(`categories.key contains "${category.key}"`)
.triggerQuantity(2)
.discountedQuantity(1)
.selectionMode(selectionMode.Cheapest)
Expand Down

0 comments on commit 689978c

Please sign in to comment.