Skip to content

Commit 9dc5f15

Browse files
corrections after review
1 parent 648df72 commit 9dc5f15

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="NotLoggedInCustomerGroup" type="customerGroup">
12+
<data key="id">0</data>
13+
<data key="code">NOT LOGGED IN</data>
14+
<data key="tax_class_id">3</data>
15+
<data key="tax_class_name">Retail Customer</data>
16+
</entity>
1117
<entity name="GeneralCustomerGroup" type="customerGroup">
1218
<data key="code">General</data>
1319
<data key="tax_class_id">3</data>

app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGroupMainSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
<element name="selectFirstRow" type="button" selector="//button[@class='action-select']"/>
1616
<element name="deleteBtn" type="button" selector="//*[text()='Delete']"/>
1717
<element name="clearAllBtn" type="button" selector="//button[text()='Clear all']"/>
18-
<element name="selectIdZeroRow" type="button" selector="tr.data-row:nth-child(1) td.data-grid-actions-cell:nth-child(4) > a.action-menu-item" />
18+
<element name="editButtonByCustomerGroupCode" type="button" selector="//tr[.//td[count(//th[./*[.='Group']]/preceding-sibling::th) + 1][./*[.='{{code}}']]]//a[contains(@href, '/edit/')]" parametrized="true" />
1919
</section>
2020
</sections>

app/code/Magento/Customer/Test/Mftf/Section/VerifyDisabledCustomerGroupFieldTest.xml renamed to app/code/Magento/Customer/Test/Mftf/Test/VerifyDisabledCustomerGroupFieldTest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@
2929
<waitForPageLoad stepKey="waitForCustomerGroupsPageLoad" />
3030

3131
<!-- 3. Select system Customer Group specified in data set from grid -->
32-
<click selector="{{AdminCustomerGroupMainSection.selectIdZeroRow}}" stepKey="clickOnEditCustomerGroup" />
32+
<click selector="{{AdminCustomerGroupMainSection.editButtonByCustomerGroupCode(NotLoggedInCustomerGroup.code)}}" stepKey="clickOnEditCustomerGroup" />
3333

3434
<!-- 4. Perform all assertions -->
35-
<seeInField selector="#customer_group_code" userInput="NOT LOGGED IN" stepKey="seeNotLoggedInTextInGroupName" />
36-
<assertElementContainsAttribute selector="#customer_group_code" attribute="disabled" expectedValue="true" stepKey="checkIfGroupNameIsDisabled" />
37-
35+
<seeInField selector="{{AdminNewCustomerGroupSection.groupName}}" userInput="NOT LOGGED IN" stepKey="seeNotLoggedInTextInGroupName" />
36+
<assertElementContainsAttribute selector="{{AdminNewCustomerGroupSection.groupName}}" attribute="disabled" expectedValue="true" stepKey="checkIfGroupNameIsDisabled" />
3837
</test>
3938
</tests>

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/VerifyDisabledCustomerGroupFieldTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Customer\Test\TestCase\VerifyDisabledCustomerGroupFieldTest" summary="Check that field is disabled in system Customer Group" ticketId="MAGETWO-52481">
1010
<variation name="VerifyDisabledCustomerGroupField1" summary="Checks that customer_group_code field is disabled in NOT LOGGED IN Customer Group">
11+
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
1112
<data name="customerGroup/dataset" xsi:type="string">NOT_LOGGED_IN</data>
1213
<data name="disabledFields" xsi:type="array">
1314
<item name="0" xsi:type="string">customer_group_code</item>

0 commit comments

Comments
 (0)