diff --git a/.changeset/tasty-scissors-complain.md b/.changeset/tasty-scissors-complain.md new file mode 100644 index 000000000..d564d6b5e --- /dev/null +++ b/.changeset/tasty-scissors-complain.md @@ -0,0 +1,5 @@ +--- +'@commercetools-test-data/cart-discount': patch +--- + +Fixes B2B cart discount predicate preset diff --git a/models/cart-discount/src/cart-discount/cart-discount-draft/presets/sample-data-b2b/tower-cranes-bogo.spec.ts b/models/cart-discount/src/cart-discount/cart-discount-draft/presets/sample-data-b2b/tower-cranes-bogo.spec.ts index 2640ddc46..d35801189 100644 --- a/models/cart-discount/src/cart-discount/cart-discount-draft/presets/sample-data-b2b/tower-cranes-bogo.spec.ts +++ b/models/cart-discount/src/cart-discount/cart-discount-draft/presets/sample-data-b2b/tower-cranes-bogo.spec.ts @@ -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", @@ -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, }, diff --git a/models/cart-discount/src/cart-discount/cart-discount-draft/presets/sample-data-b2b/tower-cranes-bogo.ts b/models/cart-discount/src/cart-discount/cart-discount-draft/presets/sample-data-b2b/tower-cranes-bogo.ts index f4061e9cf..2e076451e 100644 --- a/models/cart-discount/src/cart-discount/cart-discount-draft/presets/sample-data-b2b/tower-cranes-bogo.ts +++ b/models/cart-discount/src/cart-discount/cart-discount-draft/presets/sample-data-b2b/tower-cranes-bogo.ts @@ -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)