Skip to content

Commit 53ae1a8

Browse files
committed
Merge branch '2.3-develop' of github.com:Michalk39/magento-functional-tests-migration into 2.3-develop
2 parents 775296b + de61025 commit 53ae1a8

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
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 & 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="editButtonByCustomerGroupCode" type="button" selector="//tr[.//td[count(//th[./*[.='Group']]/preceding-sibling::th) + 1][./*[.='{{code}}']]]//a[contains(@href, '/edit/')]" parametrized="true" />
1819
</section>
1920
</sections>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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.editButtonByCustomerGroupCode(NotLoggedInCustomerGroup.code)}}" stepKey="clickOnEditCustomerGroup" />
33+
34+
<!-- 4. Perform all assertions -->
35+
<seeInField selector="{{AdminNewCustomerGroupSection.groupName}}" userInput="NOT LOGGED IN" stepKey="seeNotLoggedInTextInGroupName" />
36+
<assertElementContainsAttribute selector="{{AdminNewCustomerGroupSection.groupName}}" attribute="disabled" expectedValue="true" stepKey="checkIfGroupNameIsDisabled" />
37+
</test>
38+
</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)