Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

GraphQl-795: WebAPI test failing with MSI for AddProductToCartTest::testAddMoreProductsThatAllowed #796

Merged
merged 1 commit into from
Jul 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ public function testAddProductIfQuantityIsNotAvailable()
* @magentoApiDataFixture Magento/Catalog/_files/products.php
* @magentoApiDataFixture Magento/Checkout/_files/active_quote.php
* @magentoConfigFixture default_store cataloginventory/item_options/max_sale_qty 5
* @expectedException \Exception
* @expectedExceptionMessage The most you may purchase is 5.
*/
public function testAddMoreProductsThatAllowed()
{
$sku = 'custom-design-simple-product';
$quantity = 7;
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');

$this->expectExceptionMessageRegExp(
'/The most you may purchase is 5|The requested qty exceeds the maximum qty allowed in shopping cart/'
);

$query = $this->getQuery($maskedQuoteId, $sku, $quantity);
$this->graphQlMutation($query);
}
Expand Down