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

Commit

Permalink
ENGCOM-5518: GraphQl-795: WebAPI test failing with MSI for AddProduct…
Browse files Browse the repository at this point in the history
…ToCartTest::testAddMoreProductsThatAllowed #796
  • Loading branch information
lenaorobei committed Jul 30, 2019
2 parents bd37cbf + 951b817 commit 9021941
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 9021941

Please sign in to comment.