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

Commit b9b55be

Browse files
committed
GraphQL-431: Reconstructed add second shipping method to quote for tests and removed created fixtures
1 parent cf94b2e commit b9b55be

File tree

6 files changed

+51
-124
lines changed

6 files changed

+51
-124
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function testSetNewBillingAddress()
126126
*/
127127
public function testSetNewBillingAddressWithUseForShippingParameter()
128128
{
129-
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
129+
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId->execute('test_quote');
130130

131131
$query = <<<QUERY
132132
mutation {

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,56 @@ public function testSetNewBillingAddressWithUseForShippingParameter()
169169
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
170170
*
171171
* @throws \Exception
172-
* @throws \Magento\Framework\Exception\NoSuchEntityException
172+
*/
173+
public function testSetBillingAddressWithUseForShippingOptionForMultipleAddresses()
174+
{
175+
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_with_simple_product_multiple_addresses');
176+
177+
$query = <<<QUERY
178+
mutation {
179+
setBillingAddressOnCart(
180+
input: {
181+
cart_id: "$maskedQuoteId"
182+
billing_address: {
183+
address: {
184+
firstname: "test firstname"
185+
lastname: "test lastname"
186+
company: "test company"
187+
street: ["test street 1", "test street 2"]
188+
city: "test city"
189+
region: "test region"
190+
postcode: "887766"
191+
country_code: "US"
192+
telephone: "88776655"
193+
save_in_address_book: false
194+
}
195+
use_for_shipping: true
196+
}
197+
}
198+
) {
199+
cart {
200+
billing_address {
201+
firstname
202+
lastname
203+
address_type
204+
}
205+
shipping_addresses {
206+
firstname
207+
lastname
208+
address_type
209+
}
210+
}
211+
}
212+
}
213+
QUERY;
214+
$this->expectExceptionMessage(
215+
"Using the \"use_for_shipping\" option with multishipping is not possible."
216+
);
217+
$this->graphQlQuery($query);
218+
}
219+
220+
/**
221+
* @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php
173222
*/
174223
public function testSetBillingAddressToCustomerCart()
175224
{

dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved.php

Lines changed: 0 additions & 61 deletions
This file was deleted.

dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved_rollback.php

Lines changed: 0 additions & 14 deletions
This file was deleted.

dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php

Lines changed: 0 additions & 27 deletions
This file was deleted.

dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved_rollback.php

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)