Skip to content

Commit 554d1ad

Browse files
committed
ACP2E-197: JS validation error doesn't work for the 2nd line of the street attribute
1 parent 2ea7010 commit 554d1ad

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,23 @@
8282
<data key="default_billing">Yes</data>
8383
<requiredEntity type="region">RegionTX</requiredEntity>
8484
</entity>
85+
<entity name="US_Address_TX_Default_Billing_With_Long_Line_Apartment" type="address">
86+
<data key="firstname">John</data>
87+
<data key="lastname">Doe</data>
88+
<data key="company">Magento</data>
89+
<array key="street">
90+
<item>7700 West Parmer Lane</item>
91+
<item>Apt</item>
92+
</array>
93+
<data key="city">Austin</data>
94+
<data key="state">Texas</data>
95+
<data key="country_id">US</data>
96+
<data key="country">United States</data>
97+
<data key="postcode">78729</data>
98+
<data key="telephone">512-345-6789</data>
99+
<data key="default_billing">Yes</data>
100+
<requiredEntity type="region">RegionTX</requiredEntity>
101+
</entity>
85102
<entity name="US_Address_NY" type="address">
86103
<data key="firstname">John</data>
87104
<data key="lastname">Doe</data>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StorefrontUpdateCustomerShippingAddressFromBlockFailedTest">
11+
<annotations>
12+
<features value="Customer"/>
13+
<stories value="Update Customer Address"/>
14+
<title value="Update customer shipping address via the Storefront fails if validation is not passed"/>
15+
<description value="Update customer shipping address via the Storefront fails if validation is not passed"/>
16+
<severity value="MINOR"/>
17+
<testCaseId value="MC-43268"/>
18+
<group value="customer"/>
19+
<group value="update"/>
20+
</annotations>
21+
<before>
22+
<createData entity="US_Address_TX_Default_Billing_With_Long_Line_Apartment" stepKey="createCustomer"/>
23+
</before>
24+
<after>
25+
<deleteData createDataKey="createCustomer" stepKey="DeleteCustomer"/>
26+
</after>
27+
28+
<!--Log in to Storefront as Customer 1 -->
29+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUp">
30+
<argument name="Customer" value="$createCustomer$"/>
31+
</actionGroup>
32+
<amOnPage url="{{StorefrontCustomerAddressesPage.url}}" stepKey="OpenCustomerAddNewAddress"/>
33+
<waitForElementVisible selector="{{StorefrontCustomerAddressesSection.editDefaultShippingAddress}}" stepKey="waitForChangeShippingAddressLinkVisible"/>
34+
<click selector="{{StorefrontCustomerAddressesSection.editDefaultShippingAddress}}" stepKey="ClickEditDefaultShippingAddress"/>
35+
<fillField userInput="{{US_Address_TX_Default_Billing_With_Long_Line_Apartment.street}}" selector="{{StorefrontCustomerAddressFormSection.firstName}}" stepKey="fillStreetTwoLines"/>
36+
<click selector="{{StorefrontCustomerAddressFormSection.saveAddress}}" stepKey="saveCustomerAddress"/>
37+
<waitForElementVisible stepKey="waitForErrorAppears" selector="{{StorefrontMessagesSection.error}}"/>
38+
<see selector="{{StorefrontMessagesSection.error}}" userInput='Please enter less or equal than 10 symbols.' stepKey="seeErrorMessages"/>
39+
<fillField userInput="{{US_Address_TX_Default_Billing.street}}" selector="{{StorefrontCustomerAddressFormSection.firstName}}" stepKey="fillStreetLine"/>
40+
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessageVisible"/>
41+
<see userInput="You saved the address." selector="{{StorefrontMessagesSection.success}}" stepKey="verifyAddressAdded"/>
42+
</test>
43+
</tests>

0 commit comments

Comments
 (0)