Skip to content

Commit 5c8eb2e

Browse files
committed
MC-19255: API functional tests to cover cart promotions
- added additional validation for total cart discount
1 parent 5b30c63 commit 5c8eb2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ public function testCartPromotionsMultipleCartRules()
198198
* @magentoApiDataFixture Magento/GraphQl/Tax/_files/tax_rule_for_region_1.php
199199
* @magentoApiDataFixture Magento/GraphQl/Tax/_files/tax_calculation_price_and_cart_display_settings.php
200200
* @magentoApiDataFixture Magento/SalesRule/_files/rules_category.php
201-
*
202201
*/
203202
public function testCartPromotionsSingleCartRulesWithTaxes()
204203
{
@@ -269,6 +268,8 @@ public function testCartPromotionsSingleCartRulesWithTaxes()
269268
]
270269
);
271270
}
271+
// checking the total discount on the entire cart
272+
$this->assertEquals($response['cart']['prices']['discounts'][0]['amount']['value'], 11.82);
272273
}
273274

274275
/**
@@ -331,6 +332,7 @@ public function testCartPromotionsWithCoupons()
331332
]
332333
);
333334
}
335+
$this->assertEquals($response['cart']['prices']['discounts'][0]['amount']['value'], 5);
334336
}
335337

336338
/**

0 commit comments

Comments
 (0)