Skip to content

Commit adbacd3

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
ACP2E-197: JS validation error doesn't work for the 2nd line of the street attribute
1 parent 4e8cc45 commit adbacd3

File tree

3 files changed

+67
-11
lines changed

3 files changed

+67
-11
lines changed

app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressAttributePropertiesActionGroup.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<argument name="maximumTextLength" type="string" defaultValue="255"/>
1919
</arguments>
2020
<!--Update customer attribute properties-->
21-
<fillField selector="{{AdminReturnAttributePropertiesSection.minTextLength}}" userInput="{{minimumTextLength}}" stepKey="minimumTextLength"/>
22-
<fillField selector="{{AdminReturnAttributePropertiesSection.maxTextLength}}" userInput="{{maximumTextLength}}" stepKey="maximumTextLength"/>
23-
<click selector="{{CustomerAddressPrefixSection.save}}" stepKey="ClickToSave"/>
21+
<fillField selector="{{AdminCustomerAddressPropertySection.minTextLength}}" userInput="{{minimumTextLength}}" stepKey="minimumTextLength"/>
22+
<fillField selector="{{AdminCustomerAddressPropertySection.maxTextLength}}" userInput="{{maximumTextLength}}" stepKey="maximumTextLength"/>
23+
<click selector="{{AdminCustomerAddressPropertySection.save}}" stepKey="ClickToSave"/>
2424
<waitForPageLoad stepKey="waitForValueSaved"/>
2525
</actionGroup>
2626
</actionGroups>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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="AdminCustomerAddressPropertySection">
11+
<element name="stores" type="button" selector="#menu-magento-backend-stores"/>
12+
<element name="customerAddress" type="button" selector="//span[text()='Customer Address']"/>
13+
<element name="newAttribute" type="button" selector="#add"/>
14+
<element name="label" type="input" selector="#attribute_label"/>
15+
<element name="code" type="input" selector="#attribute_code"/>
16+
<element name="inputType" type="select" selector="#frontend_input"/>
17+
<element name="inputFilter" type="select" selector="#input_filter"/>
18+
<element name="lineCount" type="input" selector="#multiline_count"/>
19+
<element name="sortOrder" type="input" selector="#sort_order"/>
20+
<element name="selectFormToUse" type="multiselect" selector="select#used_in_forms"/>
21+
<element name="formToUse" type="multiselect" selector="//select[@id='used_in_forms']/option[text()='{{args}}']" parameterized="true"/>
22+
<element name="showInSF" type="select" selector="#is_visible"/>
23+
<element name="showInSFValue" type="select" selector="//select[@id='is_visible']/option[text()='{{arg1}}']" parameterized="true"/>
24+
<element name="valuesRequired" type="select" selector="#is_required"/>
25+
<element name="value" type="select" selector="//select[@id='is_required']/option[text()='{{arg2}}']" parameterized="true"/>
26+
<element name="save" type="button" selector="#save"/>
27+
<element name="multilineCount" type="input" selector="#multiline_count"/>
28+
<element name="attributeOption" type="button" selector="#customer_attribute_tabs_options"/>
29+
<element name="attribute" type="text" selector="//td[contains(text(), '{{arg3}}')]" parameterized="true"/>
30+
<element name="delete" type="button" selector="#delete"/>
31+
<element name="confirm" type="button" selector=".action-primary.action-accept"/>
32+
<element name="defaultLabel" type="input" selector="#customerAddressAttributeGrid_filter_frontend_label"/>
33+
<element name="search" type="button" selector="//div[@class='admin__filter-actions']//span[text()='Search']"/>
34+
<element name="reset" type="button" selector="//span[text()='Reset Filter']"/>
35+
<element name="createAccount" type="button" selector="input.action.primary"/>
36+
<element name="customerAttribute" type="input" selector="//input[contains(@name,'custom_attributes')]"/>
37+
<element name="defaultValueDate" type="input" selector="#default_value_date"/>
38+
<element name="minimumValueDate" type="input" selector="#date_range_min"/>
39+
<element name="maximumValueDate" type="input" selector="#date_range_max"/>
40+
<element name="usedForSegment" type="select" selector="#is_used_for_customer_segment"/>
41+
<element name="defaultValue" type="textarea" selector="#default_value_textarea"/>
42+
<element name="inputValidation" type="select" selector="#input_validation"/>
43+
<element name="firstRowInGrid" type="text" selector="//tbody/tr[1]"/>
44+
<element name="successMessage" type="text" selector="#messages"/>
45+
<element name="emptyRow" type="text" selector="td.empty-text"/>
46+
<element name="usedInGrid" type="select" selector="#is_used_in_grid"/>
47+
<element name="maxFileSize" type="input" selector="#max_file_size"/>
48+
<element name="fileExtensions" type="input" selector="#file_extensions"/>
49+
<element name="maxImageWidth" type="input" selector="#max_image_width"/>
50+
<element name="maxImageHeight" type="input" selector="#max_image_heght"/>
51+
<element name="minTextLength" type="input" selector="#min_text_length"/>
52+
<element name="maxTextLength" type="input" selector="#max_text_length"/>
53+
</section>
54+
</sections>

app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressTest/StorefrontUpdateCustomerShippingAddressFromBlockFailedTest.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@
2222
<createData entity="Simple_Customer_Without_Address" stepKey="createCustomer"/>
2323
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
2424
<!--Go To Customer Address page-->
25-
<!-- Go to Stores > Customer Address -->
26-
<amOnPage url="{{CustomerAddressAttributesPage.url}}" stepKey="navigateToCustomerAddressAttributesPage"/>
27-
<waitForPageLoad stepKey="waitForCustomerAddressAttributePageLoad"/>
28-
<!-- Open 'prefix' attributes by its code -->
29-
<actionGroup ref="FilterCustomerAttributesByAttributeCodeActionGroup" stepKey="findPrefixAttribute">
30-
<argument name="attributeCode" value="street"/>
25+
<actionGroup ref="GoToCustomerAddress" stepKey="GoToCustomerAddress1"/>
26+
<waitForElementVisible selector="{{AdminCustomerAddressPropertySection.defaultLabel}}" stepKey="waitForDefaultLabelToVisible"/>
27+
<fillField selector="{{AdminCustomerAddressPropertySection.defaultLabel}}" userInput="Street Address" stepKey="TypeAttributeName"/>
28+
<click selector="{{AdminCustomerAddressPropertySection.search}}" stepKey="clickToSearchButton"/>
29+
<waitForPageLoad stepKey="waitForResult"/>
30+
<click selector="{{AdminCustomerAddressPropertySection.firstRowInGrid}}" stepKey="clickToSelectAttribute"/>
31+
<waitForPageLoad stepKey="waitForAttributePageLoaded"/>
32+
<actionGroup ref="AdminEditCustomerAddressAttributePropertiesActionGroup" stepKey="editCustomerAddressProperties">
33+
<argument name="minimumTextLength" value="1"/>
34+
<argument name="maximumTextLength" value="10"/>
3135
</actionGroup>
32-
<click selector="{{AdminCustomerAddressAttributeSection.firstAttribute}}" stepKey="clickOnPrefixAttribute"/>
33-
<waitForPageLoad stepKey="waitForPrefixAttributePageLoad"/>
3436
</before>
3537
<after>
3638
<deleteData createDataKey="createCustomer" stepKey="DeleteCustomer"/>

0 commit comments

Comments
 (0)