Skip to content

Commit 958582e

Browse files
add mftf
1 parent 0fd760a commit 958582e

File tree

3 files changed

+91
-0
lines changed

3 files changed

+91
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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="AdminAssertProductOnGroupedOptionGridActionGroup">
12+
<annotations>
13+
<description>Admin assert product on grouped option grid.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product"/>
17+
</arguments>
18+
19+
<grabTextFrom selector="{{AdminGroupedProductOptionGridSection.productName}}" stepKey="grabProductName"/>
20+
<assertEquals stepKey="assertProductName">
21+
<expectedResult type="string">{{product.name}}</expectedResult>
22+
<actualResult type="variable">$grabProductName</actualResult>
23+
</assertEquals>
24+
25+
<grabTextFrom selector="{{AdminGroupedProductOptionGridSection.productSku}}" stepKey="grabProductSku"/>
26+
<assertEquals stepKey="assertProductSku">
27+
<expectedResult type="string">{{product.sku}}</expectedResult>
28+
<actualResult type="variable">$grabProductSku</actualResult>
29+
</assertEquals>
30+
</actionGroup>
31+
</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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminGroupedProductOptionGridSection">
12+
<element name="productName" type="text" selector=".data-row td[data-index='name']"/>
13+
<element name="productSku" type="text" selector=".data-row td[data-index='sku']"/>
14+
</section>
15+
</sections>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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="AdminCreateGroupedProductNonDefaultAttributeSetTest">
11+
<annotations>
12+
<features value="GroupedProduct"/>
13+
<stories value="Create product"/>
14+
<title value="Create Grouped Product when non-default attribute set is chosen"/>
15+
<description value="Create Grouped Product with simple when non-default attribute set is chosen"/>
16+
<group value="groupedProduct"/>
17+
</annotations>
18+
<before>
19+
<createData entity="ApiProductWithDescription" stepKey="createSimpleProduct"/>
20+
<createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
</before>
23+
<after>
24+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
25+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteFirstProduct"/>
26+
<deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/>
27+
</after>
28+
29+
<actionGroup ref="GoToSpecifiedCreateProductPageActionGroup" stepKey="createGroupedProduct">
30+
<argument name="productType" value="grouped"/>
31+
</actionGroup>
32+
<actionGroup ref="AdminProductPageSelectAttributeSetActionGroup" stepKey="selectAttributeSet">
33+
<argument name="attributeSetName" value="$createAttributeSet.attribute_set_name$"/>
34+
</actionGroup>
35+
<actionGroup ref="FillGroupedProductFormActionGroup" stepKey="fillProductForm">
36+
<argument name="product" value="GroupedProduct"/>
37+
</actionGroup>
38+
<actionGroup ref="AdminAssignProductToGroupActionGroup" stepKey="addSimpleToGroup">
39+
<argument name="product" value="$$createSimpleProduct$$"/>
40+
</actionGroup>
41+
<actionGroup ref="AdminAssertProductOnGroupedOptionGridActionGroup" stepKey="assertProductOptionGrid">
42+
<argument name="product" value="$$createSimpleProduct$$"/>
43+
</actionGroup>
44+
</test>
45+
</tests>

0 commit comments

Comments
 (0)