Skip to content

Commit af626ce

Browse files
jilu1okolesnyk
authored andcommitted
MQE-472: resolved array data input in MFTF; updated configurable test.
1 parent 9192d61 commit af626ce

File tree

15 files changed

+86
-40
lines changed

15 files changed

+86
-40
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@
3131
<data key="status">1</data>
3232
<required-entity type="product_extension_attribute">EavStockItem</required-entity>
3333
<required-entity type="custom_attribute_array">CustomAttributeCategoryIds</required-entity>
34-
<!--required-entity type="custom_attribute">CustomAttributeProductUrlKey</required-entity-->
3534
</entity>
3635
<entity name="NewSimpleProduct" type="product">
3736
<data key="price">321.00</data>
3837
</entity>
39-
<entity name="SimpleOne" type="product">
38+
<entity name="SimpleOne" type="product2">
4039
<data key="sku" unique="suffix">SimpleOne</data>
4140
<data key="type_id">simple</data>
4241
<data key="attribute_set_id">4</data>
@@ -45,7 +44,6 @@
4544
<data key="visibility">4</data>
4645
<data key="status">1</data>
4746
<required-entity type="product_extension_attribute">EavStockItem</required-entity>
48-
<!--required-entity type="custom_attribute_array">CustomAttributeCategoryIds</required-entity-->
4947
<required-entity type="custom_attribute">CustomAttributeProductAttribute</required-entity>
5048
</entity>
5149
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/category-meta.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
<operation name="UpdateCategory" dataType="category" type="update" auth="adminOauth" url="/V1/categories/{id}" method="PUT">
3434
<contentType>application/json</contentType>
35-
<param key="id" type="path">{id}</param>
3635
<object key="category" dataType="category">
3736
<field key="id">integer</field>
3837
<field key="parent_id">integer</field>
@@ -57,6 +56,5 @@
5756

5857
<operation name="DeleteCategory" dataType="category" type="delete" auth="adminOauth" url="/V1/categories/{id}" method="DELETE">
5958
<contentType>application/json</contentType>
60-
<param key="id" type="path">{id}</param>
6159
</operation>
6260
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product-meta.xml

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
</array>
2828
<array key="custom_attributes">
2929
<value>custom_attribute_array</value>
30-
<value>custom_attribute</value>
3130
</array>
3231
<array key="options">
3332
<value>product_option</value>
@@ -36,7 +35,6 @@
3635
</operation>
3736
<operation name="UpdateProduct" dataType="product" type="update" auth="adminOauth" url="/V1/products/{sku}" method="PUT">
3837
<contentType>application/json</contentType>
39-
<param key="sku" type="path">{sku}</param>
4038
<object dataType="product" key="product">
4139
<field key="id">integer</field>
4240
<field key="sku">string</field>
@@ -55,7 +53,6 @@
5553
</array>
5654
<array key="custom_attributes">
5755
<value>custom_attribute_array</value>
58-
<value>custom_attribute</value>
5956
</array>
6057
<array key="options">
6158
<value>product_option</value>
@@ -65,6 +62,60 @@
6562
</operation>
6663
<operation name="deleteProduct" dataType="product" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
6764
<contentType>application/json</contentType>
68-
<param key="sku" type="path">{sku}</param>
65+
</operation>
66+
<operation name="CreateProduct2" dataType="product2" type="create" auth="adminOauth" url="/V1/products" method="POST">
67+
<contentType>application/json</contentType>
68+
<object dataType="product2" key="product">
69+
<field key="sku">string</field>
70+
<field key="name">string</field>
71+
<field key="attribute_set_id">integer</field>
72+
<field key="price">integer</field>
73+
<field key="status">integer</field>
74+
<field key="visibility">integer</field>
75+
<field key="type_id">string</field>
76+
<field key="created_at">string</field>
77+
<field key="updated_at">string</field>
78+
<field key="weight">integer</field>
79+
<field key="extension_attributes">product_extension_attribute</field>
80+
<array key="product_links">
81+
<value>product_link</value>
82+
</array>
83+
<array key="custom_attributes">
84+
<value>custom_attribute</value>
85+
</array>
86+
<array key="options">
87+
<value>product_option</value>
88+
</array>
89+
</object>
90+
</operation>
91+
<operation name="UpdateProduct2" dataType="product2" type="update" auth="adminOauth" url="/V1/products/{sku}" method="PUT">
92+
<contentType>application/json</contentType>
93+
<object dataType="product2" key="product">
94+
<field key="id">integer</field>
95+
<field key="sku">string</field>
96+
<field key="name">string</field>
97+
<field key="attribute_set_id">integer</field>
98+
<field key="price">integer</field>
99+
<field key="status">integer</field>
100+
<field key="visibility">integer</field>
101+
<field key="type_id">string</field>
102+
<field key="created_at">string</field>
103+
<field key="updated_at">string</field>
104+
<field key="weight">integer</field>
105+
<field key="extension_attributes">product_extension_attribute</field>
106+
<array key="product_links">
107+
<value>product_link</value>
108+
</array>
109+
<array key="custom_attributes">
110+
<value>custom_attribute</value>
111+
</array>
112+
<array key="options">
113+
<value>product_option</value>
114+
</array>
115+
</object>
116+
<field key="saveOptions">boolean</field>
117+
</operation>
118+
<operation name="deleteProduct2" dataType="product2" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
119+
<contentType>application/json</contentType>
69120
</operation>
70121
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute-meta.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@
5858
</array>
5959
</object>
6060
</operation>
61-
<operation name="UpdateProductAttribute" dataType="ProductAttribute" type="update" auth="adminOauth" url="/V1/products/attributes/{attributeCode}" method="PUT">
61+
<operation name="UpdateProductAttribute" dataType="ProductAttribute" type="update" auth="adminOauth" url="/V1/products/attributes/{attribute_code}" method="PUT">
6262
<contentType>application/json</contentType>
63-
<param key="attributeCode" type="path">{attributeCode}</param>
6463
<object dataType="ProductAttribute" key="attribute">
6564
<field key="attribute_code">string</field>
6665
<field key="attribute_id">string</field>
@@ -110,8 +109,7 @@
110109
</array>
111110
</object>
112111
</operation>
113-
<operation name="DeleteProductAttribute" dataType="ProductAttribute" type="delete" auth="adminOauth" url="/V1/products/attributes/{attributeCode}" method="DELETE">
112+
<operation name="DeleteProductAttribute" dataType="ProductAttribute" type="delete" auth="adminOauth" url="/V1/products/attributes/{attribute_code}" method="DELETE">
114113
<contentType>application/json</contentType>
115-
<param key="attributeCode" type="path">{attributeCode}</param>
116114
</operation>
117115
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_option-meta.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
1111
<operation name="CreateProductAttributeOption" dataType="ProductAttributeOption" type="create" auth="adminOauth" url="/V1/products/attributes/{attribute_code}/options" method="POST">
1212
<contentType>application/json</contentType>
13-
<param key="attribute_code" type="path">{attribute_code}</param>
1413
<object dataType="ProductAttributeOption" key="option">
1514
<field key="label">string</field>
1615
<field key="value">string</field>
@@ -21,13 +20,10 @@
2120
</array>
2221
</object>
2322
</operation>
24-
<operation name="DeleteProductAttributeOption" dataType="ProductAttributeOption" type="delete" auth="adminOauth" url="/V1/products/attributes/{attribute_code}/options/{optionId}" method="DELETE">
23+
<operation name="DeleteProductAttributeOption" dataType="ProductAttributeOption" type="delete" auth="adminOauth" url="/V1/products/attributes/{attribute_code}/options/{option_id}" method="DELETE">
2524
<contentType>application/json</contentType>
26-
<param key="attribute_code" type="path">{attribute_code}</param>
27-
<param key="optionId" type="path">{optionId}</param>
2825
</operation>
2926
<operation name="GetProductAttributeOption" dataType="ProductAttributeOption" type="get" auth="adminOauth" url="/V1/products/attributes/{attribute_code}/options/" method="GET">
3027
<contentType>application/json</contentType>
31-
<param key="attribute_code" type="path">{attribute_code}</param>
3228
</operation>
3329
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_set-meta.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@
1515
<field key="attributeCode">string</field>
1616
<field key="sortOrder">integer</field>
1717
</operation>
18-
<operation name="DeleteProductAttributeFromAttributeSet" dataType="ProductAttributeSet" type="delete" auth="adminOauth" url="/V1/products/attribute-sets/{attributeSetId}/attributes/{attributeCode}" method="DELETE">
18+
<operation name="DeleteProductAttributeFromAttributeSet" dataType="ProductAttributeSet" type="delete" auth="adminOauth" url="/V1/products/attribute-sets/{attribute_set_id}/attributes/{attribute_code}" method="DELETE">
19+
<contentType>application/json</contentType>
20+
</operation>
21+
<operation name="GetProductAttributesFromDefaultSet" dataType="ProductAttributesFromDefaultSet" type="get" auth="adminOauth" url="/V1/products/attribute-sets/4/attributes" method="GET">
22+
<contentType>application/json</contentType>
23+
</operation>
24+
<operation name="GetDefaultProductAttributeSetInfo" dataType="DefaultProductAttributeSetInfo" type="get" auth="adminOauth" url="/V1/products/attribute-sets/4" method="GET">
1925
<contentType>application/json</contentType>
20-
<param key="attributeSetId" type="path">{attributeSetId}</param>
21-
<param key="attributeCode" type="path">{attributeCode}</param>
2226
</operation>
2327
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_link_extension_attribute-meta.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
1111
<operation name="CreateProductLinkExtensionAttribute" dataType="product_link_extension_attribute" type="create">
12-
<header param="Content-Type">application/json</header>
12+
<contentType>application/json</contentType>
1313
<field key="qty">integer</field>
1414
</operation>
1515
<operation name="UpdateProductLinkExtensionAttribute" dataType="product_link_extension_attribute" type="update">
16-
<header param="Content-Type">application/json</header>
16+
<contentType>application/json</contentType>
1717
<field key="qty">integer</field>
1818
</operation>
1919
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Metadata/coupon-meta.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1111
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
1212
<operation name="CreateCoupon" dataType="coupon" type="create" auth="adminOauth" url="/rest/V1/coupons" method="POST">
13-
<header param="Content-Type">application/json</header>
13+
<contentType>application/json</contentType>
1414
<object key="coupon" dataType="coupon">
1515
<field key="rule_id" required="true">integer</field>
1616
<field key="times_used" required="true">integer</field>
@@ -25,8 +25,7 @@
2525
</object>
2626
</operation>
2727

28-
<operation name="DeleteCoupon" dataType="coupon" type="delete" auth="adminOauth" url="/rest/V1/coupons/{couponId}" method="DELETE">
29-
<header param="Content-Type">application/json</header>
30-
<param key="couponId" type="path">{couponId}</param>
28+
<operation name="DeleteCoupon" dataType="coupon" type="delete" auth="adminOauth" url="/rest/V1/coupons/{coupon_id}" method="DELETE">
29+
<contentType>application/json</contentType>
3130
</operation>
3231
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ConfigurableProductData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
</entity>
2424
<entity name="ConfigurableProductAddChild" type="ConfigurableProductAddChild">
2525
<var key="sku" entityKey="sku" entityType="product" />
26-
<var key="childSku" entityKey="sku" entityType="product"/>
26+
<var key="childSku" entityKey="sku" entityType="product2"/>
2727
</entity>
2828
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/configurable_product_add_child-meta.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
1111
<operation name="ConfigurableProductAddChild" dataType="ConfigurableProductAddChild" type="create" auth="adminOauth" url="/V1/configurable-products/{sku}/child" method="POST">
1212
<contentType>application/json</contentType>
13-
<param key="sku" type="path">{sku}</param>
1413
<field key="childSku">string</field>
1514
</operation>
1615
</config>

0 commit comments

Comments
 (0)