From e1ac7ceef44e6e5b7db99488850f9dfd8d20e65e Mon Sep 17 00:00:00 2001 From: Iryna Lagno Date: Mon, 29 Oct 2018 13:14:19 -0500 Subject: [PATCH 01/11] MAGETWO-95876: Fatal Error during customer login --- .../Magento/Customer/Model/Authentication.php | 4 +-- .../Customer/Controller/AccountTest.php | 29 ++++++++++++++++ .../Customer/_files/customer_no_password.php | 33 +++++++++++++++++++ .../Framework/Encryption/Encryptor.php | 6 +++- 4 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Customer/_files/customer_no_password.php diff --git a/app/code/Magento/Customer/Model/Authentication.php b/app/code/Magento/Customer/Model/Authentication.php index 0967f1a0189e3..edd98bf9bee0e 100644 --- a/app/code/Magento/Customer/Model/Authentication.php +++ b/app/code/Magento/Customer/Model/Authentication.php @@ -161,12 +161,12 @@ public function isLocked($customerId) } /** - * {@inheritdoc} + * @inheritdoc */ public function authenticate($customerId, $password) { $customerSecure = $this->customerRegistry->retrieveSecureData($customerId); - $hash = $customerSecure->getPasswordHash(); + $hash = $customerSecure->getPasswordHash() ?? ''; if (!$this->encryptor->validateHash($password, $hash)) { $this->processAuthenticationFailure($customerId); if ($this->isLocked($customerId)) { diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php index ed40abd26c0b6..c94948e23ab4d 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php @@ -56,6 +56,35 @@ public function testIndexAction() $this->assertContains('Green str, 67', $body); } + /** + * @magentoDataFixture Magento/Customer/_files/customer_no_password.php + */ + public function testLoginWithIncorrectPassword() + { + $expectedMessage = 'The account sign-in was incorrect or your account is disabled temporarily. ' + . 'Please wait and try again later.'; + $this->getRequest() + ->setMethod('POST') + ->setPostValue( + [ + 'login' => [ + 'username' => 'customer@example.com', + 'password' => '123123q' + ] + ] + ); + + $this->dispatch('customer/account/loginPost'); + $this->assertRedirect($this->stringContains('customer/account/login')); + $this->assertSessionMessages( + $this->equalTo( + [ + $expectedMessage + ] + ) + ); + } + /** * Test sign up form displaying. */ diff --git a/dev/tests/integration/testsuite/Magento/Customer/_files/customer_no_password.php b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_no_password.php new file mode 100644 index 0000000000000..0340f0f841ca6 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_no_password.php @@ -0,0 +1,33 @@ +create(\Magento\Customer\Api\CustomerRepositoryInterface::class); +$customer = $objectManager->create(\Magento\Customer\Model\Customer::class); +/** @var CustomerRegistry $customerRegistry */ +$customerRegistry = $objectManager->get(CustomerRegistry::class); +/** @var Magento\Customer\Model\Customer $customer */ +$customer->setWebsiteId(1) + ->setId(1) + ->setEmail('customer@example.com') + ->setGroupId(1) + ->setStoreId(1) + ->setIsActive(1) + ->setPrefix('Mr.') + ->setFirstname('John') + ->setMiddlename('A') + ->setLastname('Smith') + ->setSuffix('Esq.') + ->setDefaultBilling(1) + ->setDefaultShipping(1) + ->setTaxvat('12') + ->setGender(0); + +$customer->isObjectNew(true); +$customer->save(); +$customerRegistry->remove($customer->getId()); diff --git a/lib/internal/Magento/Framework/Encryption/Encryptor.php b/lib/internal/Magento/Framework/Encryption/Encryptor.php index f7d52d5474ad7..919e710d4f2de 100644 --- a/lib/internal/Magento/Framework/Encryption/Encryptor.php +++ b/lib/internal/Magento/Framework/Encryption/Encryptor.php @@ -263,7 +263,11 @@ private function getPasswordSalt() */ private function getPasswordVersion() { - return array_map('intval', explode(self::DELIMITER, $this->passwordHashMap[self::PASSWORD_VERSION])); + return array_map('intval', explode( + self::DELIMITER, + (string)$this->passwordHashMap[self::PASSWORD_VERSION] + ) + ); } /** From 0154cf538f0129ab3578bb0506ee9c820baf505b Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Thu, 15 Nov 2018 09:51:20 -0600 Subject: [PATCH 02/11] MC-5535: Numbers mismatch between the products displayed and the product count on Category structure - Fixed condition and added assertions --- .../Catalog/Model/ResourceModel/Category/Collection.php | 6 +----- ...AdminFilteringCategoryProductsUsingScopeSelectorTest.xml | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index 46bb74513b59c..4562aa0b0e75f 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -322,11 +322,7 @@ public function loadProductCount($items, $countRegular = true, $countAnchor = tr ['e' => $this->getTable('catalog_category_entity')], 'main_table.category_id=e.entity_id', [] - )->where( - 'e.entity_id = :entity_id' - )->orWhere( - 'e.path LIKE :c_path' - ); + )->where('e.entity_id = :entity_id OR e.path LIKE :c_path'); if ($websiteId) { $select->join( ['w' => $this->getProductWebsiteTable()], diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml index a748635ac9a53..9e323745835c2 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml @@ -140,6 +140,7 @@ userInput="$$createProduct1.name$$" stepKey="seeProductName4"/> + + Date: Fri, 16 Nov 2018 16:01:02 -0600 Subject: [PATCH 03/11] MC-5650: Custom customer address attributes not displayed on Shipping or billing address form - Added selector --- .../Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml index 70bb0532222a4..3dcf399c9ad54 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml @@ -13,6 +13,7 @@ + From 793c72d47707c6f4824a500ff3c84f5e0637833f Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Mon, 19 Nov 2018 11:18:55 -0600 Subject: [PATCH 04/11] MAGETWO-95934: Can't upload Watermark Image - Fixed ui component element type - Added mftf test --- .../ui_component/design_config_form.xml | 6 +-- .../Mftf/Test/AdminWatermarkUploadTest.xml | 16 +++++++ .../ui_component/design_config_form.xml | 2 +- .../Theme/Test/Mftf/Page/DesignConfigPage.xml | 14 ++++++ .../Mftf/Section/AdminDesignConfigSection.xml | 18 ++++++++ .../Mftf/Test/AdminWatermarkUploadTest.xml | 46 +++++++++++++++++++ 6 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 app/code/Magento/Swatches/Test/Mftf/Test/AdminWatermarkUploadTest.xml create mode 100644 app/code/Magento/Theme/Test/Mftf/Page/DesignConfigPage.xml create mode 100644 app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml create mode 100644 app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml diff --git a/app/code/Magento/Catalog/view/adminhtml/ui_component/design_config_form.xml b/app/code/Magento/Catalog/view/adminhtml/ui_component/design_config_form.xml index 1e60823929770..cb0beb67c2711 100644 --- a/app/code/Magento/Catalog/view/adminhtml/ui_component/design_config_form.xml +++ b/app/code/Magento/Catalog/view/adminhtml/ui_component/design_config_form.xml @@ -18,7 +18,7 @@ 2 - + Allowed file types: jpeg, gif, png. @@ -78,7 +78,7 @@ 2 - + imageUploader @@ -137,7 +137,7 @@ 2 - + imageUploader diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminWatermarkUploadTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminWatermarkUploadTest.xml new file mode 100644 index 0000000000000..e9df186bae5e6 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminWatermarkUploadTest.xml @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/app/code/Magento/Swatches/view/adminhtml/ui_component/design_config_form.xml b/app/code/Magento/Swatches/view/adminhtml/ui_component/design_config_form.xml index 1c58243be3262..b38e8ecc6e201 100644 --- a/app/code/Magento/Swatches/view/adminhtml/ui_component/design_config_form.xml +++ b/app/code/Magento/Swatches/view/adminhtml/ui_component/design_config_form.xml @@ -13,7 +13,7 @@ 2 - + imageUploader diff --git a/app/code/Magento/Theme/Test/Mftf/Page/DesignConfigPage.xml b/app/code/Magento/Theme/Test/Mftf/Page/DesignConfigPage.xml new file mode 100644 index 0000000000000..7a802aee73e3c --- /dev/null +++ b/app/code/Magento/Theme/Test/Mftf/Page/DesignConfigPage.xml @@ -0,0 +1,14 @@ + + + + + +
+ + diff --git a/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml b/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml new file mode 100644 index 0000000000000..5035cf2299ea5 --- /dev/null +++ b/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml @@ -0,0 +1,18 @@ + + + + +
+ + + + + +
+
\ No newline at end of file diff --git a/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml new file mode 100644 index 0000000000000..046f8c405dfdf --- /dev/null +++ b/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml @@ -0,0 +1,46 @@ + + + + + + + + + + <description value="Watermark images should be able to be uploaded in the admin"/> + <severity value="MAJOR"/> + <testCaseId value="MAGETWO-95934"/> + <group value="Watermark"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/> + </before> + <after> + <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + </after> + <amOnPage url="{{DesignConfigPage.url}}" stepKey="navigateToDesignConfigPage" /> + <waitForPageLoad stepKey="waitForPageload1"/> + <click selector="{{AdminDesignConfigSection.scopeRow('3')}}" stepKey="editStoreView"/> + <waitForPageLoad stepKey="waitForPageload2"/> + <scrollTo selector="{{AdminDesignConfigSection.watermarkSectionHeader}}" stepKey="scrollToWatermarkSection"/> + <click selector="{{AdminDesignConfigSection.watermarkSectionHeader}}" stepKey="openWatermarkSection"/> + + <waitForElement selector="{{AdminDesignConfigSection.imageUploadInputByFieldsetName('Base')}}" stepKey="waitForInputVisible1"/> + <attachFile selector="{{AdminDesignConfigSection.imageUploadInputByFieldsetName('Base')}}" userInput="adobe-base.jpg" stepKey="attachFile1"/> + <waitForElementVisible selector="{{AdminDesignConfigSection.imageUploadPreviewByFieldsetName('Base')}}" stepKey="waitForPreviewImage"/> + + <waitForElement selector="{{AdminDesignConfigSection.imageUploadInputByFieldsetName('Thumbnail')}}" stepKey="waitForInputVisible2"/> + <attachFile selector="{{AdminDesignConfigSection.imageUploadInputByFieldsetName('Thumbnail')}}" userInput="adobe-thumb.jpg" stepKey="attachFile2"/> + <waitForElementVisible selector="{{AdminDesignConfigSection.imageUploadPreviewByFieldsetName('Thumbnail')}}" stepKey="waitForPreviewImage2"/> + + <waitForElement selector="{{AdminDesignConfigSection.imageUploadInputByFieldsetName('Small')}}" stepKey="waitForInputVisible3"/> + <attachFile selector="{{AdminDesignConfigSection.imageUploadInputByFieldsetName('Small')}}" userInput="adobe-small.jpg" stepKey="attachFile3"/> + <waitForElementVisible selector="{{AdminDesignConfigSection.imageUploadPreviewByFieldsetName('Small')}}" stepKey="waitForPreviewImage3"/> + </test> +</tests> From 5dc91198c458a888d45955542a3d6ef32ffeb8c9 Mon Sep 17 00:00:00 2001 From: Nathan Smith <nathsmit@adobe.com> Date: Mon, 19 Nov 2018 11:20:56 -0600 Subject: [PATCH 05/11] MAGETWO-95934: Can't upload Watermark Image - Added newline --- .../Theme/Test/Mftf/Section/AdminDesignConfigSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml b/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml index 5035cf2299ea5..0aa2f7f35218a 100644 --- a/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml +++ b/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml @@ -15,4 +15,4 @@ <element name="imageUploadInputByFieldsetName" type="input" selector="//*[contains(@class,'fieldset-wrapper')][child::*[contains(@class,'fieldset-wrapper-title')]//*[contains(text(),'{{arg1}}')]]//*[contains(@class,'file-uploader')]//input" parameterized="true"/> <element name="imageUploadPreviewByFieldsetName" type="input" selector="//*[contains(@class,'fieldset-wrapper')][child::*[contains(@class,'fieldset-wrapper-title')]//*[contains(text(),'{{arg1}}')]]//*[contains(@class,'file-uploader-preview')]//img" parameterized="true"/> </section> -</sections> \ No newline at end of file +</sections> From 312cd809b49b569ad0b5900504c4dec76c573cbd Mon Sep 17 00:00:00 2001 From: Max Lesechko <mlesechko@magento.com> Date: Thu, 15 Nov 2018 15:03:44 -0600 Subject: [PATCH 06/11] MAGETWO-96385: Deleting address on frontend redirects to 404 Page --- app/code/Magento/Customer/Controller/Address/Delete.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Controller/Address/Delete.php b/app/code/Magento/Customer/Controller/Address/Delete.php index a4a0944137e1b..a30e15db4b3f8 100644 --- a/app/code/Magento/Customer/Controller/Address/Delete.php +++ b/app/code/Magento/Customer/Controller/Address/Delete.php @@ -6,11 +6,16 @@ */ namespace Magento\Customer\Controller\Address; +use Magento\Framework\App\Action\HttpGetActionInterface; use Magento\Framework\App\Action\HttpPostActionInterface; -class Delete extends \Magento\Customer\Controller\Address implements HttpPostActionInterface +/** + * Delete customer address controller action. + */ +class Delete extends \Magento\Customer\Controller\Address implements HttpPostActionInterface, HttpGetActionInterface { /** + * @inheritdoc * @return \Magento\Framework\Controller\Result\Redirect */ public function execute() From 61cff0630764413173286f3423ba905184a8e1a2 Mon Sep 17 00:00:00 2001 From: Deepty Thampy <dthampy@adobe.com> Date: Tue, 20 Nov 2018 15:29:34 -0600 Subject: [PATCH 07/11] MAGETWO-96385: Deleting address on frontend redirects to 404 Page - added test to cover bug fix --- .../StorefrontCustomerAddressModalSection.xml | 15 +++++++ .../StorefrontCustomerAddressSection.xml | 14 +++++++ .../StorefrontDeleteCustomerAddressTest.xml | 42 +++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressModalSection.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressSection.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressModalSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressModalSection.xml new file mode 100644 index 0000000000000..5cdf7dfea5483 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressModalSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="StorefrontCustomerAddressConfirmationModalSection"> + <element name="message" type="text" selector="aside.confirm div.modal-content"/> + <element name="ok" type="button" selector="aside.confirm .modal-footer .action-primary"/> + <element name="cancel" type="button" selector="aside.confirm .modal-footer .action-secondary"/> + </section> +</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressSection.xml new file mode 100644 index 0000000000000..02ff60dc2c169 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontCustomerAddressSection"> + <element name="deleteAdditionalAddress" type="button" selector=".action.delete" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml new file mode 100644 index 0000000000000..59f945c917420 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontDeleteCustomerAddressTest"> + <annotations> + <stories value="Delete customer address from storefront"/> + <title value="User should be able to delete Customer address successfully from storefront"/> + <description value="Admin should be able to reset customer password"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-5713"/> + <group value="Customer"/> + </annotations> + <before> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + </before> + <after> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <actionGroup ref="logout" stepKey="logout"/> + </after> + <amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/> + <fillField stepKey="fillEmail" userInput="$$createCustomer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/> + <fillField stepKey="fillPassword" userInput="$$createCustomer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}"/> + <click stepKey="clickSignInAccountButton" selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}"/> + <actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo"> + <argument name="Address" value="US_Address_NY"/> + </actionGroup> + <see userInput="You saved the address." stepKey="verifyAddressCreated"/> + <click selector="{{StorefrontCustomerAddressSection.deleteAdditionalAddress}}" stepKey="deleteAdditionalAddress"/> + <waitForElementVisible selector="{{StorefrontCustomerAddressConfirmationModalSection.message}}" stepKey="waitFortheConfirmationModal"/> + <see selector="{{StorefrontCustomerAddressConfirmationModalSection.message}}" userInput="Are you sure you want to delete this address?" stepKey="seeAddressDeleteConfirmationMessage"/> + <click selector="{{StorefrontCustomerAddressConfirmationModalSection.ok}}" stepKey="confirmDelete"/> + <waitForPageLoad stepKey="waitForDeleteToFinish"/> + <see userInput="You deleted the address." stepKey="verifyDeleteAddress"/> + </test> +</tests> From 2702e23c36aa7dcf24da56a47074f944046069e6 Mon Sep 17 00:00:00 2001 From: Deepty Thampy <dthampy@adobe.com> Date: Tue, 20 Nov 2018 15:31:36 -0600 Subject: [PATCH 08/11] MAGETWO-96385: Deleting address on frontend redirects to 404 Page - fixed annotation --- .../Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml index 59f945c917420..db560773a87f6 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml @@ -12,7 +12,7 @@ <annotations> <stories value="Delete customer address from storefront"/> <title value="User should be able to delete Customer address successfully from storefront"/> - <description value="Admin should be able to reset customer password"/> + <description value="User should be able to delete Customer address successfully from storefront"/> <severity value="CRITICAL"/> <testCaseId value="MC-5713"/> <group value="Customer"/> From 1ee184b765766d3dbda58c3b03b7e572661c0c44 Mon Sep 17 00:00:00 2001 From: Iryna Lagno <ilagno@adobe.com> Date: Wed, 28 Nov 2018 10:32:55 -0600 Subject: [PATCH 09/11] MC-5580: Fatal Error during customer login - fix static tests --- .../Magento/Framework/Encryption/Encryptor.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Encryption/Encryptor.php b/lib/internal/Magento/Framework/Encryption/Encryptor.php index 919e710d4f2de..343b631b4a468 100644 --- a/lib/internal/Magento/Framework/Encryption/Encryptor.php +++ b/lib/internal/Magento/Framework/Encryption/Encryptor.php @@ -228,6 +228,8 @@ public function validateHashVersion($hash, $validateCount = false) } /** + * Explode password hash + * * @param string $hash * @return array */ @@ -243,6 +245,8 @@ private function explodePasswordHash($hash) } /** + * Returns password hash + * * @return string */ private function getPasswordHash() @@ -251,6 +255,8 @@ private function getPasswordHash() } /** + * Returns password salt + * * @return string */ private function getPasswordSalt() @@ -259,11 +265,15 @@ private function getPasswordSalt() } /** + * Returns password version + * * @return array */ private function getPasswordVersion() { - return array_map('intval', explode( + return array_map( + 'intval', + explode( self::DELIMITER, (string)$this->passwordHashMap[self::PASSWORD_VERSION] ) From 70b43a519c48fe8f781c49a1f23d05e93e140359 Mon Sep 17 00:00:00 2001 From: Deepty Thampy <dthampy@adobe.com> Date: Thu, 29 Nov 2018 10:05:03 -0600 Subject: [PATCH 10/11] MAGETWO-96385: Deleting address on frontend redirects to 404 Page - recommitting after a force push --- .../StorefrontCustomerAddressModalSection.xml | 15 --------------- .../Section/StorefrontCustomerAddressSection.xml | 14 -------------- .../StorefrontCustomerAddressesSection.xml | 1 + .../Test/StorefrontDeleteCustomerAddressTest.xml | 9 ++++----- .../Mftf/Section/ModalConfirmationSection.xml | 1 + 5 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressModalSection.xml delete mode 100644 app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressSection.xml diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressModalSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressModalSection.xml deleted file mode 100644 index 5cdf7dfea5483..0000000000000 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressModalSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> - <section name="StorefrontCustomerAddressConfirmationModalSection"> - <element name="message" type="text" selector="aside.confirm div.modal-content"/> - <element name="ok" type="button" selector="aside.confirm .modal-footer .action-primary"/> - <element name="cancel" type="button" selector="aside.confirm .modal-footer .action-secondary"/> - </section> -</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressSection.xml deleted file mode 100644 index 02ff60dc2c169..0000000000000 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontCustomerAddressSection"> - <element name="deleteAdditionalAddress" type="button" selector=".action.delete" timeout="30"/> - </section> -</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressesSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressesSection.xml index 8a6a98ff45a6a..05bbc559defac 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressesSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerAddressesSection.xml @@ -10,5 +10,6 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="StorefrontCustomerAddressesSection"> <element name="addressesList" type="text" selector=".block-addresses-list" /> + <element name="deleteAdditionalAddress" type="button" selector="//ol[@class='items addresses']/li[@class='item'][{{var}}]//a[@class='action delete']" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml index db560773a87f6..7a96616885468 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml @@ -22,7 +22,6 @@ </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> </after> <amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/> <fillField stepKey="fillEmail" userInput="$$createCustomer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/> @@ -32,10 +31,10 @@ <argument name="Address" value="US_Address_NY"/> </actionGroup> <see userInput="You saved the address." stepKey="verifyAddressCreated"/> - <click selector="{{StorefrontCustomerAddressSection.deleteAdditionalAddress}}" stepKey="deleteAdditionalAddress"/> - <waitForElementVisible selector="{{StorefrontCustomerAddressConfirmationModalSection.message}}" stepKey="waitFortheConfirmationModal"/> - <see selector="{{StorefrontCustomerAddressConfirmationModalSection.message}}" userInput="Are you sure you want to delete this address?" stepKey="seeAddressDeleteConfirmationMessage"/> - <click selector="{{StorefrontCustomerAddressConfirmationModalSection.ok}}" stepKey="confirmDelete"/> + <click selector="{{StorefrontCustomerAddressesSection.deleteAdditionalAddress('1')}}" stepKey="deleteAdditionalAddress"/> + <waitForElementVisible selector="{{ModalConfirmationSection.modalContent}}" stepKey="waitFortheConfirmationModal"/> + <see selector="{{ModalConfirmationSection.modalContent}}" userInput="Are you sure you want to delete this address?" stepKey="seeAddressDeleteConfirmationMessage"/> + <click selector="{{ModalConfirmationSection.OkButton}}" stepKey="confirmDelete"/> <waitForPageLoad stepKey="waitForDeleteToFinish"/> <see userInput="You deleted the address." stepKey="verifyDeleteAddress"/> </test> diff --git a/app/code/Magento/Ui/Test/Mftf/Section/ModalConfirmationSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/ModalConfirmationSection.xml index 35ec242f05c52..4bf84d9ee63da 100644 --- a/app/code/Magento/Ui/Test/Mftf/Section/ModalConfirmationSection.xml +++ b/app/code/Magento/Ui/Test/Mftf/Section/ModalConfirmationSection.xml @@ -9,6 +9,7 @@ <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="ModalConfirmationSection"> + <element name="modalContent" type="text" selector="aside.confirm div.modal-content"/> <element name="CancelButton" type="button" selector="//footer[@class='modal-footer']/button[contains(@class, 'action-dismiss')]"/> <element name="OkButton" type="button" selector="//footer[@class='modal-footer']/button[contains(@class, 'action-accept')]"/> </section> From 0b8c7e9d014f0117ac48335f33ef87159321b0f2 Mon Sep 17 00:00:00 2001 From: Devagouda Patil <depatil@ip-192-168-0-5.ec2.internal> Date: Fri, 30 Nov 2018 11:44:10 -0600 Subject: [PATCH 11/11] MAGETWO-95934: Can't upload Watermark Image - Added zephyr testcase reference --- .../Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml index 046f8c405dfdf..a667f40ad327f 100644 --- a/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml +++ b/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml @@ -15,7 +15,7 @@ <title value="MAGETWO-95934: Can't upload Watermark Image"/> <description value="Watermark images should be able to be uploaded in the admin"/> <severity value="MAJOR"/> - <testCaseId value="MAGETWO-95934"/> + <testCaseId value="MC-5796"/> <group value="Watermark"/> </annotations> <before>