From 6339e203f96b10d77577aa293f0c619905613e46 Mon Sep 17 00:00:00 2001 From: AleksLi Date: Thu, 7 Mar 2019 20:10:24 +0100 Subject: [PATCH 1/6] GraphQL-431: Covered SetBillingAddressOnCartTest with multiple shipping addresses in quote. Added Fixture for that. --- .../Customer/SetBillingAddressOnCartTest.php | 45 +++++++++++++++++++ .../quote_with_multiple_addresses_saved.php | 26 +++++++++++ 2 files changed, 71 insertions(+) create mode 100644 dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php index 129375debe06..8a45b6ab5b2f 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php @@ -427,6 +427,51 @@ public function testSetBillingAddressIfCustomerIsNotOwnerOfAddress() $this->graphQlQuery($query, [], '', $this->getHeaderMap('customer2@search.example.com')); } + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_multiple_addresses_saved.php + * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php + * @throws \Exception + */ + public function testSetBillingAddressWithUseForShippingOptionForMultipleAddresses() + { + $maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_1'); + + $query = <<expectExceptionMessage( + "Using the \"use_for_shipping\" option with multishipping is not possible." + ); + $this->graphQlQuery($query, [], '', $this->getHeaderMap()); + } + /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @expectedException \Exception diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php new file mode 100644 index 000000000000..7e30782e9879 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php @@ -0,0 +1,26 @@ +create(\Magento\Quote\Model\Quote\Address::class); + +$quoteSecondShippingAddress->importCustomerAddressData($addressRepository->getById(2)); + +$quote->setStoreId( + 1 +)->setIsActive( + true +)->setIsMultiShipping( + true +)->setShippingAddress( + $quoteSecondShippingAddress +); + +$quoteRepository->save($quote); \ No newline at end of file From cf94b2ec1a9c3272afe95e69f63f0a90ebdd2271 Mon Sep 17 00:00:00 2001 From: AleksLi Date: Sat, 9 Mar 2019 11:22:52 +0100 Subject: [PATCH 2/6] GraphQL-431: Covered SetBillingAddressToCart for guest user. Added couple new fixtures and rollbacks --- .../Customer/SetBillingAddressOnCartTest.php | 13 +++- .../Guest/SetBillingAddressOnCartTest.php | 13 ++-- ...st_quote_with_multiple_addresses_saved.php | 61 +++++++++++++++++++ ...with_multiple_addresses_saved_rollback.php | 14 +++++ .../quote_with_multiple_addresses_saved.php | 1 + ...with_multiple_addresses_saved_rollback.php | 20 ++++++ 6 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved.php create mode 100644 dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved_rollback.php create mode 100644 dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved_rollback.php diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php index 8a45b6ab5b2f..de8310580f21 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php @@ -60,6 +60,8 @@ protected function setUp() * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * + * @throws \Exception */ public function testSetNewBillingAddress() { @@ -119,6 +121,8 @@ public function testSetNewBillingAddress() * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * + * @throws \Exception */ public function testSetNewBillingAddressWithUseForShippingParameter() { @@ -197,6 +201,8 @@ public function testSetNewBillingAddressWithUseForShippingParameter() * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * + * @throws \Exception */ public function testSetBillingAddressFromAddressBook() { @@ -279,6 +285,8 @@ public function testSetNotExistedBillingAddressFromAddressBook() * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * + * @throws \Exception */ public function testSetNewBillingAddressAndFromAddressBookAtSameTime() { @@ -429,13 +437,12 @@ public function testSetBillingAddressIfCustomerIsNotOwnerOfAddress() /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_multiple_addresses_saved.php - * @magentoApiDataFixture Magento/Customer/_files/customer.php - * @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php + * * @throws \Exception */ public function testSetBillingAddressWithUseForShippingOptionForMultipleAddresses() { - $maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_1'); + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1'); $query = <<getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_with_simple_product_without_address'); $query = <<create(\Magento\Quote\Model\Quote\Address::class); +$quoteShippingAddress->isObjectNew(true); +$quoteShippingAddress->setData( + [ + 'attribute_set_id' => 2, + 'telephone' => 3468676, + 'postcode' => 75477, + 'country_id' => 'US', + 'city' => 'CityM', + 'company' => 'CompanyName', + 'street' => 'Green str, 67', + 'lastname' => 'Smith', + 'firstname' => 'John', + 'parent_id' => 1, + 'region_id' => 1, + ] +); + +/** @var \Magento\Quote\Model\Quote\Address $quoteSecondShippingAddressShippingAddress */ +$quoteSecondShippingAddress = $objectManager->create(\Magento\Quote\Model\Quote\Address::class); +$quoteSecondShippingAddress->isObjectNew(true); +$quoteSecondShippingAddress->setData( + [ + 'attribute_set_id' => 2, + 'telephone' => 3234676, + 'postcode' => 47676, + 'country_id' => 'US', + 'city' => 'CityX', + 'street' => ['Black str, 48'], + 'lastname' => 'Smith', + 'firstname' => 'Mia', + 'parent_id' => 1, + 'region_id' => 1, + ] +); +/** @var \Magento\Quote\Model\Quote $quote */ +$quote->setIsMultiShipping(true) + ->setReservedOrderId('test_order_with_simple_product_multiple_addresses') + ->setShippingAddress($quoteShippingAddress) + ->setShippingAddress($quoteSecondShippingAddress) + ->setCustomerEmail($quote->getCustomerEmail()) + ->addProduct($product->load($product->getId()), 1); + +$quote->collectTotals()->save(); + +/** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */ +$quoteIdMask->setQuoteId($quote->getId()); +$quoteIdMask->setDataChanges(true); +$quoteIdMask->save(); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved_rollback.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved_rollback.php new file mode 100644 index 000000000000..a5d321b19816 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved_rollback.php @@ -0,0 +1,14 @@ +create(\Magento\Quote\Model\Quote::class); +$quote->load('test_order_with_simple_product_multiple_addresses', 'reserved_order_id')->delete(); + +/** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */ +$quoteIdMask = $objectManager->create(\Magento\Quote\Model\QuoteIdMask::class); +$quoteIdMask->delete($quote->getId()); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php index 7e30782e9879..c2e0a989b287 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php @@ -5,6 +5,7 @@ */ require 'quote_with_address_saved.php'; +require __DIR__ . '/../../Customer/_files/customer_two_addresses.php'; $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved_rollback.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved_rollback.php new file mode 100644 index 000000000000..e8299292e6e1 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved_rollback.php @@ -0,0 +1,20 @@ +create(\Magento\Quote\Model\Quote::class); +$quote->load('test_order_1', 'reserved_order_id')->delete(); + +/** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */ +$quoteIdMask = $objectManager->create(\Magento\Quote\Model\QuoteIdMask::class); +$quoteIdMask->delete($quote->getId()); + +require __DIR__ . '/../../Checkout/_files/quote_with_address_rollback.php'; +require __DIR__ . '/../../Customer/_files/customer_two_addresses_rollback.php'; +require __DIR__ . '/../../Customer/_files/customer_rollback.php'; +require __DIR__ . '/../../Catalog/_files/products_rollback.php'; From b9b55bef7625ae2c52c53d0794c8700f97c3e552 Mon Sep 17 00:00:00 2001 From: AleksLi Date: Wed, 13 Mar 2019 22:45:56 +0200 Subject: [PATCH 3/6] GraphQL-431: Reconstructed add second shipping method to quote for tests and removed created fixtures --- .../Customer/SetBillingAddressOnCartTest.php | 2 +- .../Guest/SetBillingAddressOnCartTest.php | 51 +++++++++++++++- ...st_quote_with_multiple_addresses_saved.php | 61 ------------------- ...with_multiple_addresses_saved_rollback.php | 14 ----- .../quote_with_multiple_addresses_saved.php | 27 -------- ...with_multiple_addresses_saved_rollback.php | 20 ------ 6 files changed, 51 insertions(+), 124 deletions(-) delete mode 100644 dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved.php delete mode 100644 dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved_rollback.php delete mode 100644 dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php delete mode 100644 dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved_rollback.php diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php index de8310580f21..500b060f0615 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php @@ -126,7 +126,7 @@ public function testSetNewBillingAddress() */ public function testSetNewBillingAddressWithUseForShippingParameter() { - $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + $maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId->execute('test_quote'); $query = <<getMaskedQuoteIdByReversedQuoteId('test_order_with_simple_product_multiple_addresses'); + + $query = <<expectExceptionMessage( + "Using the \"use_for_shipping\" option with multishipping is not possible." + ); + $this->graphQlQuery($query); + } + + /** + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php */ public function testSetBillingAddressToCustomerCart() { diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved.php deleted file mode 100644 index f0c6727000f5..000000000000 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved.php +++ /dev/null @@ -1,61 +0,0 @@ -create(\Magento\Quote\Model\Quote\Address::class); -$quoteShippingAddress->isObjectNew(true); -$quoteShippingAddress->setData( - [ - 'attribute_set_id' => 2, - 'telephone' => 3468676, - 'postcode' => 75477, - 'country_id' => 'US', - 'city' => 'CityM', - 'company' => 'CompanyName', - 'street' => 'Green str, 67', - 'lastname' => 'Smith', - 'firstname' => 'John', - 'parent_id' => 1, - 'region_id' => 1, - ] -); - -/** @var \Magento\Quote\Model\Quote\Address $quoteSecondShippingAddressShippingAddress */ -$quoteSecondShippingAddress = $objectManager->create(\Magento\Quote\Model\Quote\Address::class); -$quoteSecondShippingAddress->isObjectNew(true); -$quoteSecondShippingAddress->setData( - [ - 'attribute_set_id' => 2, - 'telephone' => 3234676, - 'postcode' => 47676, - 'country_id' => 'US', - 'city' => 'CityX', - 'street' => ['Black str, 48'], - 'lastname' => 'Smith', - 'firstname' => 'Mia', - 'parent_id' => 1, - 'region_id' => 1, - ] -); -/** @var \Magento\Quote\Model\Quote $quote */ -$quote->setIsMultiShipping(true) - ->setReservedOrderId('test_order_with_simple_product_multiple_addresses') - ->setShippingAddress($quoteShippingAddress) - ->setShippingAddress($quoteSecondShippingAddress) - ->setCustomerEmail($quote->getCustomerEmail()) - ->addProduct($product->load($product->getId()), 1); - -$quote->collectTotals()->save(); - -/** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */ -$quoteIdMask->setQuoteId($quote->getId()); -$quoteIdMask->setDataChanges(true); -$quoteIdMask->save(); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved_rollback.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved_rollback.php deleted file mode 100644 index a5d321b19816..000000000000 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/guest_quote_with_multiple_addresses_saved_rollback.php +++ /dev/null @@ -1,14 +0,0 @@ -create(\Magento\Quote\Model\Quote::class); -$quote->load('test_order_with_simple_product_multiple_addresses', 'reserved_order_id')->delete(); - -/** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */ -$quoteIdMask = $objectManager->create(\Magento\Quote\Model\QuoteIdMask::class); -$quoteIdMask->delete($quote->getId()); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php deleted file mode 100644 index c2e0a989b287..000000000000 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved.php +++ /dev/null @@ -1,27 +0,0 @@ -create(\Magento\Quote\Model\Quote\Address::class); - -$quoteSecondShippingAddress->importCustomerAddressData($addressRepository->getById(2)); - -$quote->setStoreId( - 1 -)->setIsActive( - true -)->setIsMultiShipping( - true -)->setShippingAddress( - $quoteSecondShippingAddress -); - -$quoteRepository->save($quote); \ No newline at end of file diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved_rollback.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved_rollback.php deleted file mode 100644 index e8299292e6e1..000000000000 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_multiple_addresses_saved_rollback.php +++ /dev/null @@ -1,20 +0,0 @@ -create(\Magento\Quote\Model\Quote::class); -$quote->load('test_order_1', 'reserved_order_id')->delete(); - -/** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */ -$quoteIdMask = $objectManager->create(\Magento\Quote\Model\QuoteIdMask::class); -$quoteIdMask->delete($quote->getId()); - -require __DIR__ . '/../../Checkout/_files/quote_with_address_rollback.php'; -require __DIR__ . '/../../Customer/_files/customer_two_addresses_rollback.php'; -require __DIR__ . '/../../Customer/_files/customer_rollback.php'; -require __DIR__ . '/../../Catalog/_files/products_rollback.php'; From c8c9c4d7abe5f62a82940478ba9135de54b5956c Mon Sep 17 00:00:00 2001 From: AleksLi Date: Fri, 15 Mar 2019 12:08:26 +0200 Subject: [PATCH 4/6] GraphQL-431: Reformatted with use_for_shipping = true. --- .../GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php | 4 ++-- .../GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php index 500b060f0615..e861c9734df6 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php @@ -440,9 +440,9 @@ public function testSetBillingAddressIfCustomerIsNotOwnerOfAddress() * * @throws \Exception */ - public function testSetBillingAddressWithUseForShippingOptionForMultipleAddresses() + public function testSetBillingAddressWithUseForShippingOption() { - $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1'); + $maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId()->execute('test_order_1'); $query = <<getMaskedQuoteIdByReversedQuoteId('test_order_with_simple_product_multiple_addresses'); + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_with_simple_product_multiple_addresses'); $query = << Date: Thu, 28 Mar 2019 21:07:57 +0100 Subject: [PATCH 5/6] GraphQL-431: Rechecking the whole method and fixed small mistakes --- .../Quote/Customer/SetBillingAddressOnCartTest.php | 14 ++++++++------ .../Quote/Guest/SetBillingAddressOnCartTest.php | 12 +++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php index e861c9734df6..c0878b4bcefe 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php @@ -126,7 +126,7 @@ public function testSetNewBillingAddress() */ public function testSetNewBillingAddressWithUseForShippingParameter() { - $maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId->execute('test_quote'); + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); $query = <<getMaskedQuoteIdByReversedQuoteId()->execute('test_order_1'); + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1'); $query = <<expectExceptionMessage( - "Using the \"use_for_shipping\" option with multishipping is not possible." - ); $this->graphQlQuery($query, [], '', $this->getHeaderMap()); } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php index ec2a6747f8d7..36f2bf082065 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php @@ -165,14 +165,13 @@ public function testSetNewBillingAddressWithUseForShippingParameter() /** * _security - * @magentoApiDataFixture Magento/Customer/_files/customer.php - * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php + * @magentoApiDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php * * @throws \Exception */ public function testSetBillingAddressWithUseForShippingOption() { - $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_with_simple_product_multiple_addresses'); + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_with_simple_product_without_address'); $query = <<expectExceptionMessage( - "Using the \"use_for_shipping\" option with multishipping is not possible." - ); $this->graphQlQuery($query); } /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php + * + * @throws \Exception */ public function testSetBillingAddressToCustomerCart() { - $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1'); $query = << Date: Mon, 1 Apr 2019 22:34:46 +0200 Subject: [PATCH 6/6] GraphQL-431: Removed duplicate for use_for_shipping check --- .../Customer/SetBillingAddressOnCartTest.php | 42 ---------------- .../Guest/SetBillingAddressOnCartTest.php | 50 ------------------- 2 files changed, 92 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php index c0878b4bcefe..9aeac07cdec3 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php @@ -439,48 +439,6 @@ public function testSetBillingAddressIfCustomerIsNotOwnerOfAddress() $this->graphQlQuery($query, [], '', $this->getHeaderMap('customer2@search.example.com')); } - /** - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_shipping_method.php - * @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php - * - * @throws \Exception - */ - public function testSetBillingAddressWithUseForShippingOption() - { - $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1'); - - $query = <<graphQlQuery($query, [], '', $this->getHeaderMap()); - } - /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @expectedException \Exception diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php index 36f2bf082065..12157844a207 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php @@ -163,56 +163,6 @@ public function testSetNewBillingAddressWithUseForShippingParameter() $this->assertNewAddressFields($shippingAddressResponse, 'SHIPPING'); } - /** - * _security - * @magentoApiDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php - * - * @throws \Exception - */ - public function testSetBillingAddressWithUseForShippingOption() - { - $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_with_simple_product_without_address'); - - $query = <<graphQlQuery($query); - } - /** * @magentoApiDataFixture Magento/Checkout/_files/quote_with_address_saved.php *