From d983e257bc4675a4d522a179e6af7b9800e1ffcf Mon Sep 17 00:00:00 2001 From: Valerii Naida Date: Thu, 20 Jun 2019 14:14:02 -0500 Subject: [PATCH] magento/graphql-ce#486: Add customer account validation in Quote operations --- .../Customer/ChangeCustomerPasswordTest.php | 21 ------------------- .../GraphQl/Customer/GetAddressesTest.php | 20 ------------------ .../Customer/UpdateCustomerAddressTest.php | 18 ---------------- 3 files changed, 59 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/ChangeCustomerPasswordTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/ChangeCustomerPasswordTest.php index 301bf5ead1b1..b7d0985a854a 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/ChangeCustomerPasswordTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/ChangeCustomerPasswordTest.php @@ -162,27 +162,6 @@ public function testChangePasswordIfNewPasswordIsEmpty() $this->graphQlMutation($query, [], '', $headerMap); } - /** - * @magentoApiDataFixture Magento/GraphQl/Customer/_files/enable_customer_account_confirmation.php - * @magentoApiDataFixture Magento/Customer/_files/customer.php - * @expectedException \Exception - * @expectedExceptionMessage This account isn't confirmed. Verify and try again. - */ - public function testChangePasswordIfAccountIsNotConfirmed() - { - $customerEmail = 'customer@example.com'; - $currentPassword = 'password'; - $newPassword = 'anotherPassword1'; - - /* get header map before setting the customer unconfirmed */ - $headerMap = $this->getCustomerAuthHeaders($customerEmail, $currentPassword); - - $this->setCustomerConfirmation(1); - $query = $this->getQuery($currentPassword, $newPassword); - - $this->graphQlMutation($query, [], '', $headerMap); - } - /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @expectedException \Exception diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/GetAddressesTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/GetAddressesTest.php index 6168babbd5db..e0c6841b2ea2 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/GetAddressesTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/GetAddressesTest.php @@ -66,26 +66,6 @@ public function testGetCustomerWithAddresses() $this->assertCustomerAddressesFields($customer, $response); } - /** - * @magentoApiDataFixture Magento/Customer/_files/inactive_customer.php - * @magentoApiDataFixture Magento/Customer/_files/customer_address.php - * @magentoApiDataFixture Magento/Customer/_files/customer_confirmation_config_enable.php - * @expectedException Exception - * @expectedExceptionMessage The account sign-in was incorrect or your account is disabled temporarily. - */ - public function testGetCustomerAddressIfAccountIsNotConfirmed() - { - $query = $this->getQuery(); - - $userName = 'customer@example.com'; - $password = 'password'; - - $customerToken = $this->customerTokenService->createCustomerAccessToken($userName, $password); - $headerMap = ['Authorization' => 'Bearer ' . $customerToken]; - - $this->graphQlQuery($query, [], '', $headerMap); - } - /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/Customer/_files/customer_address.php diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php index e5506273adef..e7bdbd225712 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php @@ -345,24 +345,6 @@ public function testUpdateAnotherCustomerAddress() $this->graphQlMutation($mutation, [], '', $this->getCustomerAuthHeaders($userName, $password)); } - /** - * @magentoApiDataFixture Magento/Customer/_files/inactive_customer.php - * @magentoApiDataFixture Magento/Customer/_files/customer_address.php - * @magentoApiDataFixture Magento/Customer/_files/customer_confirmation_config_enable.php - * @expectedException Exception - * @expectedExceptionMessage The account sign-in was incorrect or your account is disabled temporarily. - */ - public function testUpdateCustomerAddressIfAccountIsNotConfirmed() - { - $userName = 'customer@needAconfirmation.com'; - $password = 'password'; - $addressId = 1; - - $mutation = $this->getMutation($addressId); - - $this->graphQlMutation($mutation, [], '', $this->getCustomerAuthHeaders($userName, $password)); - } - /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/Customer/_files/customer_address.php