@@ -88,7 +88,7 @@ private function assertLineItemDiscountPrices($response, $productsInCart, $qty,
88
88
'prices ' => [
89
89
'row_total ' => ['value ' => $ productsInCart [$ itemIndex ]->getSpecialPrice ()*$ qty ],
90
90
'row_total_including_tax ' => ['value ' => $ productsInCart [$ itemIndex ]->getSpecialPrice ()*$ qty ],
91
- 'discount ' => ['value ' => $ productsInCart [$ itemIndex ]->getSpecialPrice ()*$ qty *0.5 ],
91
+ 'total_item_discount ' => ['value ' => $ productsInCart [$ itemIndex ]->getSpecialPrice ()*$ qty *0.5 ],
92
92
'discounts ' => [
93
93
0 =>[
94
94
'amount ' =>
@@ -169,7 +169,7 @@ public function testCartPromotionsMultipleCartRules()
169
169
170
170
//removing the elements from the response so that the rest of the response values can be compared
171
171
unset($ productsInResponse [$ itemIndex ][0 ]['prices ' ]['discounts ' ]);
172
- unset($ productsInResponse [$ itemIndex ][0 ]['prices ' ]['discount ' ]);
172
+ unset($ productsInResponse [$ itemIndex ][0 ]['prices ' ]['total_item_discount ' ]);
173
173
$ this ->assertResponseFields (
174
174
$ productsInResponse [$ itemIndex ][0 ],
175
175
[
@@ -253,7 +253,7 @@ public function testCartPromotionsSingleCartRulesWithTaxes()
253
253
// row_total including tax is the price + price * tax rate
254
254
'row_total_including_tax ' => ['value ' => $ rowTotalIncludingTax ],
255
255
// discount from cart rule after tax is applied : 50% of row_total_including_tax
256
- 'discount ' => ['value ' => round ($ rowTotalIncludingTax /2 , 2 )],
256
+ 'total_item_discount ' => ['value ' => round ($ rowTotalIncludingTax /2 , 2 )],
257
257
'discounts ' => [
258
258
0 =>[
259
259
'amount ' =>
@@ -285,7 +285,7 @@ private function getCartItemPricesQuery(string $cartId): string
285
285
row_total_including_tax{
286
286
value
287
287
}
288
- discount {value}
288
+ total_item_discount {value}
289
289
discounts{
290
290
amount{value}
291
291
label
0 commit comments