@@ -461,6 +461,55 @@ public function testSetNewShippingAddressWithMissedRequiredParameters(string $in
461
461
$ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ());
462
462
}
463
463
464
+ /**
465
+ * Covers case with empty street
466
+ *
467
+ * @todo Unskip case with missing "street" parameter https://github.com/magento/graphql-ce/issues/1033
468
+ *
469
+ * @magentoApiDataFixture Magento/Customer/_files/customer.php
470
+ * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
471
+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
472
+ * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
473
+ *
474
+ * @expectedException \Magento\Framework\GraphQl\Exception\GraphQlInputException
475
+ * @expectedExceptionMessage Required parameter "street" is missing
476
+ */
477
+ public function testSetNewShippingAddressWithMissedRequiredStreetParameters ()
478
+ {
479
+ $ this ->markTestSkipped (
480
+ 'Notice: Undefined index: street https://github.com/magento/graphql-ce/issues/1033 '
481
+ );
482
+ $ maskedQuoteId = $ this ->getMaskedQuoteIdByReservedOrderId ->execute ('test_quote ' );
483
+ $ query = <<<QUERY
484
+ mutation {
485
+ setShippingAddressesOnCart(
486
+ input: {
487
+ cart_id: " $ maskedQuoteId"
488
+ shipping_addresses: [
489
+ {
490
+ address: {
491
+ country_code: "US"
492
+ firstname: "J"
493
+ lastname: "D"
494
+ telephone: "+"
495
+ city: "C"
496
+ }
497
+ }
498
+ ]
499
+ }
500
+ ) {
501
+ cart {
502
+ shipping_addresses {
503
+ city
504
+ }
505
+ }
506
+ }
507
+ }
508
+ QUERY ;
509
+
510
+ $ this ->graphQlMutation ($ query , [], '' , $ this ->getHeaderMap ());
511
+ }
512
+
464
513
/**
465
514
* @return array
466
515
*/
@@ -480,13 +529,6 @@ public function dataProviderUpdateWithMissedRequiredParameters(): array
480
529
'shipping_addresses: {} ' ,
481
530
'Required parameter "cart_id" is missing ' ,
482
531
],
483
- /** */
484
- /** @todo Unskip case with missing "street" parameter https://github.com/magento/graphql-ce/issues/1033 */
485
- // 'missing_street' => [
486
- // 'cart_id: "cart_id_value" shipping_addresses: ' .
487
- // '[{address: {country_code: "US" firstname: "J" lastname: "D" telephone: "+" city: "C"}}]',
488
- // 'Required parameter "street" is missing',
489
- // ]
490
532
];
491
533
}
492
534
0 commit comments