Skip to content

Commit 8dc0090

Browse files
jilu1tomreece
authored andcommitted
MQE-429: Added a sample test to perform api PUT request.
1 parent a8ddcb9 commit 8dc0090

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductData.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,19 @@
3333
<required-entity type="custom_attribute_array">CustomAttributeCategoryIds</required-entity>
3434
<!--required-entity type="custom_attribute">CustomAttributeProductUrlKey</required-entity-->
3535
</entity>
36+
<entity name="NewSimpleProduct" type="product">
37+
<data key="price">321.00</data>
38+
</entity>
39+
<entity name="SimpleOne" type="product">
40+
<data key="sku" unique="suffix">SimpleOne</data>
41+
<data key="type_id">simple</data>
42+
<data key="attribute_set_id">4</data>
43+
<data key="name" unique="suffix">SimpleProduct</data>
44+
<data key="price">1.23</data>
45+
<data key="visibility">4</data>
46+
<data key="status">1</data>
47+
<required-entity type="product_extension_attribute">EavStockItem</required-entity>
48+
<!--required-entity type="custom_attribute_array">CustomAttributeCategoryIds</required-entity-->
49+
<required-entity type="custom_attribute">CustomAttributeProductAttribute</required-entity>
50+
</entity>
3651
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Test XML Example -->
3+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
4+
<cest name="UpdateSimpleProductByApiCest">
5+
<annotations>
6+
<features value="Update simple product by api test."/>
7+
<stories value="Update simple product by api test."/>
8+
<group value="example"/>
9+
<env value="chrome"/>
10+
<env value="firefox"/>
11+
<env value="phantomjs"/>
12+
<env value="headless"/>
13+
</annotations>
14+
<before>
15+
<createData mergeKey="categoryHandle" entity="SimpleSubCategory"/>
16+
<createData mergeKey="originalProductHandle" entity="SimpleProduct" >
17+
<required-entity createDataKey="categoryHandle"/>
18+
</createData>
19+
<updateData mergeKey="productHandle" entity="NewSimpleProduct" createDataKey="originalProductHandle">
20+
</updateData>
21+
22+
</before>
23+
<after>
24+
<deleteData mergeKey="delete" createDataKey="productHandle"/>
25+
</after>
26+
<test name="UpdateSimpleProductByApiTest">
27+
</test>
28+
</cest>
29+
</config>

0 commit comments

Comments
 (0)