Skip to content

Commit 8b63f45

Browse files
author
Prabhu Ram
committed
MC-32120: Catalog price rules are not included in CartItemPrices
- Added review fixes
1 parent 80a321d commit 8b63f45

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CartTotalsTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ public function testGetCartTotalsWithCatalogRuleAndCartRuleApplied()
140140
self::assertEquals(18, $cartItem['prices']['row_total_including_tax']['value']);
141141
self::assertEquals(9, $cartItem['prices']['total_item_discount']['value']);
142142

143+
$discount = $cartItem['prices']['discounts'][0];
144+
self::assertEquals("50% Off for all orders", $discount['label']);
145+
self::assertEquals(9, $discount['amount']['value']);
146+
143147
self::assertArrayHasKey('prices', $response['cart']);
144148
$pricesResponse = $response['cart']['prices'];
145149
self::assertEquals(9, $pricesResponse['grand_total']['value']);
@@ -277,6 +281,12 @@ private function getQuery(string $maskedQuoteId): string
277281
total_item_discount {
278282
value
279283
}
284+
discounts {
285+
label
286+
amount {
287+
value
288+
}
289+
}
280290
}
281291
}
282292
prices {

0 commit comments

Comments
 (0)