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

Commit 4464396

Browse files
committed
Introduced separate skipped test instead of comments in data provider
Signed-off-by: Tomash Khamlai <[email protected]>
1 parent 124384d commit 4464396

File tree

1 file changed

+49
-7
lines changed

1 file changed

+49
-7
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,55 @@ public function testSetNewShippingAddressWithMissedRequiredParameters(string $in
461461
$this->graphQlMutation($query, [], '', $this->getHeaderMap());
462462
}
463463

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+
464513
/**
465514
* @return array
466515
*/
@@ -480,13 +529,6 @@ public function dataProviderUpdateWithMissedRequiredParameters(): array
480529
'shipping_addresses: {}',
481530
'Required parameter "cart_id" is missing',
482531
],
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-
// ]
490532
];
491533
}
492534

0 commit comments

Comments
 (0)