forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request magento#3495 from magento-borg/BugFixPR
[2.3-develop] Bug Fixes
- Loading branch information
Showing
17 changed files
with
223 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?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="User should be able to delete Customer address successfully from storefront"/> | ||
<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"/> | ||
</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="{{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> | ||
</tests> |
16 changes: 16 additions & 0 deletions
16
app/code/Magento/Swatches/Test/Mftf/Test/AdminWatermarkUploadTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?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="AdminWatermarkUploadTest"> | ||
<waitForElement selector="{{AdminDesignConfigSection.imageUploadInputByFieldsetName('Swatch Image')}}" stepKey="waitForInputVisible4" after="waitForPreviewImage3"/> | ||
<attachFile selector="{{AdminDesignConfigSection.imageUploadInputByFieldsetName('Swatch Image')}}" userInput="adobe-small.jpg" stepKey="attachFile4" after="waitForInputVisible4"/> | ||
<waitForElementVisible selector="{{AdminDesignConfigSection.imageUploadPreviewByFieldsetName('Swatch Image')}}" stepKey="waitForPreviewImage4" after="attachFile4"/> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Theme/Test/Mftf/Page/DesignConfigPage.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> | ||
<page name="DesignConfigPage" url="theme/design_config/" area="admin" module="Magento_Theme"> | ||
<section name="AdminDesignConfigSection"/> | ||
</page> | ||
</pages> |
18 changes: 18 additions & 0 deletions
18
app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?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="AdminDesignConfigSection"> | ||
<element name="scopeRow" type="button" selector="//*[contains(@class,'data-row')][{{arg1}}]//*[contains(@class,'action-menu-item')]" parameterized="true"/> | ||
<element name="watermarkSectionHeader" type="text" selector="[data-index='watermark']"/> | ||
<element name="watermarkSection" type="text" selector="[data-index='watermark'] .admin__fieldset-wrapper-content"/> | ||
<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> |
46 changes: 46 additions & 0 deletions
46
app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?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="AdminWatermarkUploadTest"> | ||
<annotations> | ||
<features value="Watermark"/> | ||
<stories value="Watermark"/> | ||
<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="MC-5796"/> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' => '[email protected]', | ||
'password' => '123123q' | ||
] | ||
] | ||
); | ||
|
||
$this->dispatch('customer/account/loginPost'); | ||
$this->assertRedirect($this->stringContains('customer/account/login')); | ||
$this->assertSessionMessages( | ||
$this->equalTo( | ||
[ | ||
$expectedMessage | ||
] | ||
) | ||
); | ||
} | ||
|
||
/** | ||
* Test sign up form displaying. | ||
*/ | ||
|
33 changes: 33 additions & 0 deletions
33
dev/tests/integration/testsuite/Magento/Customer/_files/customer_no_password.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
use Magento\Customer\Model\CustomerRegistry; | ||
|
||
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); | ||
/** @var $repository \Magento\Customer\Api\CustomerRepositoryInterface */ | ||
$repository = $objectManager->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('[email protected]') | ||
->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()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters