From 6e7df2854110482368d8bdeb9d00d95009d2e034 Mon Sep 17 00:00:00 2001 From: Valerii Naida Date: Tue, 30 Jul 2019 12:44:03 -0500 Subject: [PATCH] magento/graphql-ce#795: WebAPI test failing with MSI for AddProductToCartTest::testAddMoreProductsThatAllowed --- .../GraphQl/CatalogInventory/AddProductToCartTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogInventory/AddProductToCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogInventory/AddProductToCartTest.php index f71ec9ad8521e..36f5d7028fb0a 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogInventory/AddProductToCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogInventory/AddProductToCartTest.php @@ -50,8 +50,6 @@ 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() { @@ -59,6 +57,10 @@ public function testAddMoreProductsThatAllowed() $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); }