Skip to content

Commit 648df72

Browse files
Convert VerifyDisabledCustomerGroupFieldTest to MFTF #664
1 parent c427332 commit 648df72

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +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" />
1819
</section>
1920
</sections>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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="VerifyDisabledCustomerGroupFieldTest">
12+
<annotations>
13+
<stories value="Check that field is disabled in system Customer Group"/>
14+
<title value="Check that field is disabled in system Customer Group"/>
15+
<description value="Checks that customer_group_code field is disabled in NOT LOGGED IN Customer Group"/>
16+
<testCaseId value="MAGETWO-52481"/>
17+
<severity value="CRITICAL"/>
18+
<group value="customers"/>
19+
<group value="mtf_migrated"/>
20+
</annotations>
21+
22+
<!-- Steps -->
23+
<!-- 1. Login to backend as admin user -->
24+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
25+
<waitForPageLoad stepKey="waitForAdminPageLoad" />
26+
27+
<!-- 2. Navigate to Customers > Customer Groups -->
28+
<amOnPage url="{{AdminCustomerGroupPage.url}}" stepKey="amOnCustomerGroupPage" />
29+
<waitForPageLoad stepKey="waitForCustomerGroupsPageLoad" />
30+
31+
<!-- 3. Select system Customer Group specified in data set from grid -->
32+
<click selector="{{AdminCustomerGroupMainSection.selectIdZeroRow}}" stepKey="clickOnEditCustomerGroup" />
33+
34+
<!-- 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+
38+
</test>
39+
</tests>

0 commit comments

Comments
 (0)