Skip to content

Commit 61cff06

Browse files
dthampyfascinosum
authored andcommitted
MAGETWO-96385: Deleting address on frontend redirects to 404 Page
- added test to cover bug fix
1 parent 312cd80 commit 61cff06

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="StorefrontCustomerAddressConfirmationModalSection">
11+
<element name="message" type="text" selector="aside.confirm div.modal-content"/>
12+
<element name="ok" type="button" selector="aside.confirm .modal-footer .action-primary"/>
13+
<element name="cancel" type="button" selector="aside.confirm .modal-footer .action-secondary"/>
14+
</section>
15+
</sections>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="StorefrontCustomerAddressSection">
12+
<element name="deleteAdditionalAddress" type="button" selector=".action.delete" timeout="30"/>
13+
</section>
14+
</sections>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontDeleteCustomerAddressTest">
12+
<annotations>
13+
<stories value="Delete customer address from storefront"/>
14+
<title value="User should be able to delete Customer address successfully from storefront"/>
15+
<description value="Admin should be able to reset customer password"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-5713"/>
18+
<group value="Customer"/>
19+
</annotations>
20+
<before>
21+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
22+
</before>
23+
<after>
24+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
25+
<actionGroup ref="logout" stepKey="logout"/>
26+
</after>
27+
<amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/>
28+
<fillField stepKey="fillEmail" userInput="$$createCustomer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/>
29+
<fillField stepKey="fillPassword" userInput="$$createCustomer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}"/>
30+
<click stepKey="clickSignInAccountButton" selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}"/>
31+
<actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo">
32+
<argument name="Address" value="US_Address_NY"/>
33+
</actionGroup>
34+
<see userInput="You saved the address." stepKey="verifyAddressCreated"/>
35+
<click selector="{{StorefrontCustomerAddressSection.deleteAdditionalAddress}}" stepKey="deleteAdditionalAddress"/>
36+
<waitForElementVisible selector="{{StorefrontCustomerAddressConfirmationModalSection.message}}" stepKey="waitFortheConfirmationModal"/>
37+
<see selector="{{StorefrontCustomerAddressConfirmationModalSection.message}}" userInput="Are you sure you want to delete this address?" stepKey="seeAddressDeleteConfirmationMessage"/>
38+
<click selector="{{StorefrontCustomerAddressConfirmationModalSection.ok}}" stepKey="confirmDelete"/>
39+
<waitForPageLoad stepKey="waitForDeleteToFinish"/>
40+
<see userInput="You deleted the address." stepKey="verifyDeleteAddress"/>
41+
</test>
42+
</tests>

0 commit comments

Comments
 (0)