Skip to content

Commit 7b98baf

Browse files
committed
Merge branch '580-convert-DeleteSystemCustomerGroupTest' of https://github.com/vovsky/magento-functional-tests-migration into 2.4-develop
2 parents 3ff76c4 + 335a6e3 commit 7b98baf

File tree

6 files changed

+110
-0
lines changed

6 files changed

+110
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminOpenCustomerGroupEditPageFromGridActionGroup">
11+
<arguments>
12+
<argument name="groupCode" type="string"/>
13+
</arguments>
14+
<conditionalClick selector="{{AdminCustomerGroupMainSection.selectFirstRow}}" dependentSelector="{{AdminCustomerGroupMainSection.selectFirstRow}}" visible="true" stepKey="clickSelectButton"/>
15+
<click selector="{{AdminCustomerGroupMainSection.editButtonByCustomerGroupCode(groupCode)}}" stepKey="clickOnEditCustomerGroup" />
16+
<waitForPageLoad stepKey="waitForCustomerGroupEditPage"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminOpenCustomerGroupsGridPageActionGroup">
12+
<amOnPage url="{{AdminCustomerGroupsIndexPage.url}}" stepKey="goToAdminCustomerGroupIndexPage"/>
13+
<waitForPageLoad time="30" stepKey="waitForCustomerGroupIndexPageLoad"/>
14+
</actionGroup>
15+
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertDeleteCustomerGroupButtonMissingActionGroup">
12+
<dontSeeElement selector="AdminEditCustomerGroupSection.deleteButton" stepKey="dontSeeDeleteButton"/>
13+
</actionGroup>
14+
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminEditCustomerGroupSection">
12+
<element name="deleteButton" type="button" selector=".page-actions-buttons button#delete"/>
13+
</section>
14+
</sections>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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="AdminCustomersDeleteSystemCustomerGroupTest">
11+
<annotations>
12+
<features value="Customer"/>
13+
<title value="System Customer Groups"/>
14+
<description value="Admin should not be able to delete system customer groups"/>
15+
<group value="customers"/>
16+
<group value="mtf_migrated"/>
17+
</annotations>
18+
<before>
19+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
20+
</before>
21+
<after>
22+
<actionGroup ref="logout" stepKey="logout"/>
23+
</after>
24+
25+
<!--Verify Not Logged In customer group-->
26+
<!--Go to Customer Group grid page-->
27+
<actionGroup ref="AdminOpenCustomerGroupsGridPageActionGroup" stepKey="openCustomerGroupGridPageToCheckNotLoggedInGroup"/>
28+
<actionGroup ref="AdminFilterCustomerGroupByNameActionGroup" stepKey="filterCustomerGroupsByNotLoggedInGroup">
29+
<argument name="customerGroupName" value="{{NotLoggedInCustomerGroup.code}}"/>
30+
</actionGroup>
31+
<actionGroup ref="AdminOpenCustomerGroupEditPageFromGridActionGroup" stepKey="openNotLoggedInCustomerGroupEditPage">
32+
<argument name="groupCode" value="{{NotLoggedInCustomerGroup.code}}"/>
33+
</actionGroup>
34+
<actionGroup ref="AssertDeleteCustomerGroupButtonMissingActionGroup" stepKey="verifyThereIsNoDeleteButtonForNotLoggedInGroup"/>
35+
36+
<!--Verify General customer group-->
37+
<!--Go to Customer Group grid page-->
38+
<actionGroup ref="AdminOpenCustomerGroupsGridPageActionGroup" stepKey="openCustomerGroupGridPageToCheckGeneralGroup"/>
39+
<actionGroup ref="AdminFilterCustomerGroupByNameActionGroup" stepKey="filterCustomerGroupsByGeneralGroup">
40+
<argument name="customerGroupName" value="{{GeneralCustomerGroup.code}}"/>
41+
</actionGroup>
42+
<actionGroup ref="AdminOpenCustomerGroupEditPageFromGridActionGroup" stepKey="openGeneralCustomerGroupEditPage">
43+
<argument name="groupCode" value="{{GeneralCustomerGroup.code}}"/>
44+
</actionGroup>
45+
<actionGroup ref="AssertDeleteCustomerGroupButtonMissingActionGroup" stepKey="verifyThereIsNoDeleteButtonForGeneralGroup"/>
46+
</test>
47+
</tests>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
<variation name="DeleteSystemCustomerGroup1" summary="Checks that NOT LOGGED IN Customer Group cannot be deleted">
1111
<data name="customerGroup/dataset" xsi:type="string">NOT_LOGGED_IN</data>
1212
<constraint name="Magento\Customer\Test\Constraint\AssertNoDeleteForSystemCustomerGroup" />
13+
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
1314
</variation>
1415
<variation name="DeleteSystemCustomerGroup2" summary="Checks that General Customer Group cannot be deleted">
1516
<data name="customerGroup/dataset" xsi:type="string">General</data>
1617
<constraint name="Magento\Customer\Test\Constraint\AssertNoDeleteForSystemCustomerGroup" />
18+
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
1719
</variation>
1820
</testCase>
1921
</config>

0 commit comments

Comments
 (0)