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 708e034a4626b..6f27693eeb4a7 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogInventory/AddProductToCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogInventory/AddProductToCartTest.php @@ -46,89 +46,6 @@ public function testAddProductIfQuantityIsNotAvailable() $this->graphQlMutation($query); } - /** - * @magentoApiDataFixture Magento/Catalog/_files/product_simple_with_custom_options.php - * @magentoApiDataFixture Magento/Checkout/_files/active_quote.php - * @expectedException \Exception - * @expectedExceptionMessage The product's required option(s) weren't entered. Make sure the options are entered and try again. - */ - public function testAddProductWithoutRequiredCustomOptions() - { - $sku = 'simple_with_custom_options'; - $qty = 1; - - $maskedQuoteId = $this->getMaskedQuoteId(); - $query = $this->getAddSimpleProductQuery($maskedQuoteId, $sku, $qty); - $this->graphQlQuery($query); - } - - /** - * @magentoApiDataFixture Magento/Catalog/_files/product_simple_with_custom_options.php - * @magentoApiDataFixture Magento/Checkout/_files/active_quote.php - */ - public function testAddProductWithRequiredCustomOptions() - { - $sku = 'simple_with_custom_options'; - $qty = 1; - $productCustomOptions = Bootstrap::getObjectManager() - ->get(\Magento\Catalog\Api\ProductCustomOptionRepositoryInterface::class) - ->getList($sku); - $customizableOptions = ''; - foreach ($productCustomOptions as $option) { - $value = $option->getValues() ? - '[' . key($option->getValues()) . ']' : - 'Test'; - $customizableOptions .= ' { - id: ' . $option->getId() . ' - value: "' . $value . '" - }'; - } - - $maskedQuoteId = $this->getMaskedQuoteId(); - $query = <<graphQlQuery($query); - self::assertArrayHasKey('cart', $response['addSimpleProductsToCart']); - - self::assertEquals($sku, $response['addSimpleProductsToCart']['cart']['items'][0]['product']['sku']); - self::assertEquals( - 1, - $response['addSimpleProductsToCart']['cart']['items'][0]['customizable_options'][0]['is_required'] - ); - } - /** * @magentoApiDataFixture Magento/Catalog/_files/products.php * @magentoApiDataFixture Magento/Checkout/_files/active_quote.php