@@ -157,6 +157,32 @@ public function testPlaceOrderWithNoShippingMethod()
157157 $ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ());
158158 }
159159
160+
161+ /**
162+ * @magentoApiDataFixture Magento/Customer/_files/customer.php
163+ * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
164+ * @magentoConfigFixture default_store carriers/flatrate/active 1
165+ * @magentoConfigFixture default_store payment/checkmo/active 1
166+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
167+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
168+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php
169+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
170+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php
171+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_checkmo_payment_method.php
172+ * @magentoConfigFixture default_store carriers/flatrate/active 0
173+ */
174+ public function testPlaceOrderWithDisabledShippingMethod ()
175+ {
176+ $ reservedOrderId = 'test_quote ' ;
177+ $ maskedQuoteId = $ this ->getMaskedQuoteIdByReservedOrderId ->execute ($ reservedOrderId );
178+ $ query = $ this ->getQuery ($ maskedQuoteId );
179+
180+ self ::expectExceptionMessage (
181+ 'Unable to place order: The shipping method is missing. Select the shipping method and try again '
182+ );
183+ $ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ());
184+ }
185+
160186 /**
161187 * @magentoApiDataFixture Magento/Customer/_files/customer.php
162188 * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
0 commit comments