Skip to content

Commit

Permalink
Introduced separate skipped test instead of comments in data provider
Browse files Browse the repository at this point in the history
Signed-off-by: Tomash Khamlai <[email protected]>
  • Loading branch information
TomashKhamlai committed Oct 30, 2019
1 parent 124384d commit 4464396
Showing 1 changed file with 49 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,55 @@ public function testSetNewShippingAddressWithMissedRequiredParameters(string $in
$this->graphQlMutation($query, [], '', $this->getHeaderMap());
}

/**
* Covers case with empty street
*
* @todo Unskip case with missing "street" parameter https://github.com/magento/graphql-ce/issues/1033
*
* @magentoApiDataFixture Magento/Customer/_files/customer.php
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
*
* @expectedException \Magento\Framework\GraphQl\Exception\GraphQlInputException
* @expectedExceptionMessage Required parameter "street" is missing
*/
public function testSetNewShippingAddressWithMissedRequiredStreetParameters()
{
$this->markTestSkipped(
'Notice: Undefined index: street https://github.com/magento/graphql-ce/issues/1033'
);
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
$query = <<<QUERY
mutation {
setShippingAddressesOnCart(
input: {
cart_id: "$maskedQuoteId"
shipping_addresses: [
{
address: {
country_code: "US"
firstname: "J"
lastname: "D"
telephone: "+"
city: "C"
}
}
]
}
) {
cart {
shipping_addresses {
city
}
}
}
}
QUERY;

$this->graphQlMutation($query, [], '', $this->getHeaderMap());
}

/**
* @return array
*/
Expand All @@ -480,13 +529,6 @@ public function dataProviderUpdateWithMissedRequiredParameters(): array
'shipping_addresses: {}',
'Required parameter "cart_id" is missing',
],
/** */
/** @todo Unskip case with missing "street" parameter https://github.com/magento/graphql-ce/issues/1033 */
// 'missing_street' => [
// 'cart_id: "cart_id_value" shipping_addresses: ' .
// '[{address: {country_code: "US" firstname: "J" lastname: "D" telephone: "+" city: "C"}}]',
// 'Required parameter "street" is missing',
// ]
];
}

Expand Down

0 comments on commit 4464396

Please sign in to comment.