Skip to content

Commit 019cf68

Browse files
committed
Merge branch 'MAGETWO-91570' of github.com:magento-earl-grey/magento2ce into MAGETWO-91570
2 parents 2328833 + 05e5df7 commit 019cf68

File tree

48 files changed

+1657
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1657
-289
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="ApiBundleLink" type="bundle_link">
12+
<var key="sku" entityKey="sku" entityType="product2"/>
13+
<var key="option_id" entityKey="option_id" entityType="bundle_options"/>
14+
<var key="sku" entityKey="sku" entityType="product"/>
15+
<data key="qty">1</data>
16+
<data key="is_default">1</data>
17+
<data key="price">1.11</data>
18+
<data key="price_type">1</data>
19+
<data key="can_change_quantity">1</data>
20+
</entity>
21+
</entities>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="DropdownBundleOption" type="bundle_option">
12+
<data key="title" unique="suffix">bundle-option-dropdown</data>
13+
<data key="required">true</data>
14+
<data key="type">dropdown</data>
15+
<data key="position">1</data>
16+
<var key="sku" entityKey="sku" entityType="product2"/>
17+
</entity>
18+
<entity name="AllBundleOptions" type="bundle_options">
19+
<var key="sku" entityKey="sku" entityType="product"/>
20+
</entity>
21+
</entities>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
10+
<entity name="CustomAttributeDynamicPrice" type="custom_attribute">
11+
<data key="attribute_code">price_type</data>
12+
<data key="value">0</data>
13+
</entity>
14+
<entity name="CustomAttributeFixPrice" type="custom_attribute">
15+
<data key="attribute_code">price_type</data>
16+
<data key="value">1</data>
17+
</entity>
18+
<entity name="CustomAttributePriceView" type="custom_attribute">
19+
<data key="attribute_code">price_view</data>
20+
<data key="value">1</data>
21+
</entity>
22+
</entities>

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,18 @@
1919
<data key="status">1</data>
2020
<data key="urlKey" unique="suffix">bundleproduct</data>
2121
</entity>
22+
<entity name="ApiBundleProduct" type="product2">
23+
<data key="name" unique="suffix">Api Bundle Product</data>
24+
<data key="sku" unique="suffix">api-bundle-product</data>
25+
<data key="type_id">bundle</data>
26+
<data key="attribute_set_id">4</data>
27+
<data key="visibility">4</data>
28+
<data key="status">1</data>
29+
<data key="urlKey" unique="suffix">api-bundle-product</data>
30+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
31+
<requiredEntity type="custom_attribute">ApiProductDescription</requiredEntity>
32+
<requiredEntity type="custom_attribute">ApiProductShortDescription</requiredEntity>
33+
<requiredEntity type="custom_attribute">CustomAttributeDynamicPrice</requiredEntity>
34+
<requiredEntity type="custom_attribute">CustomAttributePriceView</requiredEntity>
35+
</entity>
2236
</entities>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
11+
<operation name="CreateBundleLink" dataType="bundle_link" type="create" auth="adminOauth" url="/V1/bundle-products/{sku}/links/{option_id}" method="POST">
12+
<contentType>application/json</contentType>
13+
<object dataType="bundle_link" key="linkedProduct">
14+
<field key="sku">string</field>
15+
<field key="option_id">integer</field>
16+
<field key="qty">integer</field>
17+
<field key="position">integer</field>
18+
<field key="is_default">boolean</field>
19+
<field key="price">number</field>
20+
<field key="price_type">integer</field>
21+
<field key="can_change_quantity">integer</field>
22+
</object>
23+
</operation>
24+
</operations>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
11+
<operation name="CreateBundleOption" dataType="bundle_option" type="create" auth="adminOauth" url="/V1/bundle-products/options/add" method="POST">
12+
<contentType>application/json</contentType>
13+
<object dataType="bundle_option" key="option">
14+
<field key="title">string</field>
15+
<field key="required">boolean</field>
16+
<field key="type">string</field>
17+
<field key="position">integer</field>
18+
<field key="sku">string</field>
19+
</object>
20+
</operation>
21+
</operations>
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
11+
<operation name="GetAllBundleOptions" dataType="bundle_options" type="get" auth="adminOauth" url="/V1/bundle-products/{sku}/options/all" method="GET">
12+
<contentType>application/json</contentType>
13+
</operation>
14+
</operations>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminCategoryActionGroup.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,68 @@
118118
<dontSee selector="{{AdminCategorySidebarTreeSection.categoryInTree(categoryEntity.name)}}" stepKey="dontSeeCategoryInTree"/>
119119
</actionGroup>
120120

121+
<!-- Actions to fill out a new category from the product page-->
122+
<!-- The action assumes that you are already on an admin product configuration page -->
123+
<actionGroup name="FillNewProductCategory" >
124+
<arguments>
125+
<argument name="categoryName" defaultValue="Test Category" type="string"/>
126+
<argument name="parentCategoryName" defaultValue="default" type="string"/>
127+
</arguments>
128+
129+
<!-- Click on new Category -->
130+
<click stepKey="clickNewCategory" selector="{{AdminProductCategoryCreationSection.newCategory}}"/>
131+
<waitForPageLoad stepKey="waitForFieldSet"/>
132+
133+
<fillField stepKey="fillCategoryName" selector="{{AdminProductCategoryCreationSection.nameInput}}" userInput="{{categoryName}}"/>
134+
135+
<!-- Search and select a parent catagory for the product -->
136+
<click stepKey="clickParentCategory" selector="{{AdminProductCategoryCreationSection.parentCategory}}"/>
137+
<waitForPageLoad stepKey="waitForDropDownVisible"/>
138+
<fillField stepKey="searchForParent" userInput="{{parentCategoryName}}" selector="{{AdminProductCategoryCreationSection.parentSearch}}"/>
139+
<waitForPageLoad stepKey="waitForFieldResults"/>
140+
<click stepKey="clickParent" selector="{{AdminProductCategoryCreationSection.parentSearchResult}}"/>
141+
142+
<click stepKey="createCategory" selector="{{AdminProductCategoryCreationSection.createCategory}}"/>
143+
<waitForPageLoad stepKey="waitForCategoryCreated"/>
144+
</actionGroup>
145+
146+
<!-- Actions to delete the category last made -->
147+
<actionGroup name="DeleteMostRecentCategory">
148+
149+
<amOnPage url="/{{AdminCategoryPage.url}}" stepKey="goToCategoryFrontPage"/>
150+
151+
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
152+
153+
<click stepKey="goToCreateCategory" selector="{{AdminCategorySidebarTreeSection.lastCreatedCategory}}" />
154+
<waitForPageLoad stepKey="waitForCreatedCategoryPageLoad"/>
155+
156+
<click stepKey="clickDeleteCategory" selector="{{AdminCategoryMainActionsSection.DeleteButton}}" />
157+
<waitForPageLoad stepKey="waitForModalVisible"/>
158+
159+
<click stepKey="clickOkToDelete" selector="{{AdminCategoryModalSection.ok}}" />
160+
161+
<waitForPageLoad stepKey="waitForModalNotVisible"/>
162+
163+
</actionGroup>
164+
165+
<!-- Actions to check if a certain category is present on the page -->
166+
<actionGroup name="CategoryPresent" >
167+
<arguments>
168+
<argument name="categoryName" defaultValue="Test Category" type="string"/>
169+
</arguments>
170+
171+
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="goToCategoryAdminPage"/>
172+
<waitForPageLoad stepKey="waitForCategoryAdminPageLoad"/>
173+
174+
<see userInput="{{categoryName}}" stepKey="assertCategoryOnAdminPage" selector="{{AdminCategorySidebarTreeSection.treeContainer}}"/>
175+
176+
<amOnPage url="/{{categoryName}}.html" stepKey="goToCustomerFrontPage"/>
177+
178+
<see userInput="{{categoryName}}" stepKey="assertCategoryNameOnStorefront" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
179+
180+
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad"/>
181+
</actionGroup>
182+
121183
<!--Check that name field is required-->
122184
<actionGroup name="CheckCategoryNameIsRequiredField">
123185
<seeInCurrentUrl url="{{AdminCategoryPage.url}}" stepKey="seeOnCategoryPage"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
12+
13+
<actionGroup name="CreateCustomRadioOptions">
14+
15+
<!-- ActionGroup will add a single custom option to a product -->
16+
<!-- You must already be on the product creation page -->
17+
<arguments>
18+
<argument name="customOptionName"/>
19+
<argument name="productOption"/>
20+
<argument name="productOption2"/>
21+
</arguments>
22+
23+
<click stepKey="clickAddOptions" selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}"/>
24+
<waitForPageLoad stepKey="waitForAddProductPageLoad"/>
25+
26+
<!-- Fill in the option and select the type of radio (once) -->
27+
<fillField stepKey="fillInOptionTitle" selector="{{AdminProductCustomizableOptionsSection.lastOptionTitle}}" userInput="{{customOptionName}}"/>
28+
<click stepKey="clickOptionTypeParent" selector="{{AdminProductCustomizableOptionsSection.lastOptionTypeParent}}"/>
29+
<waitForPageLoad stepKey="waitForDropdownOpen"/>
30+
<click stepKey="clickOptionType" selector="{{AdminProductCustomizableOptionsSection.optionType('Radio Buttons')}}"/>
31+
32+
<!-- Add three radio options based on the parameter -->
33+
<click stepKey="clickAddValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
34+
35+
<fillField stepKey="fillInValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{productOption.title}}"/>
36+
<fillField stepKey="fillInValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{productOption.price}}"/>
37+
38+
<click stepKey="clickAddValue2" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
39+
40+
<fillField stepKey="fillInValueTitle2" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{productOption2.title}}"/>
41+
<fillField stepKey="fillInValuePrice2" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{productOption2.price}}"/>
42+
43+
44+
</actionGroup>
45+
46+
</actionGroups>

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,29 @@
281281
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
282282
<requiredEntity type="custom_attribute_array">ApiProductNewsFromDate</requiredEntity>
283283
</entity>
284+
<entity name="GetProduct" type="product">
285+
<var key="sku" entityKey="sku" entityType="product"/>
286+
</entity>
287+
<entity name="GetProduct2" type="product2">
288+
<var key="sku" entityKey="sku" entityType="product2"/>
289+
</entity>
290+
<entity name="GetProduct3" type="product3">
291+
<var key="sku" entityKey="sku" entityType="product3"/>
292+
</entity>
293+
<entity name="ApiSimplePrice1" type="product">
294+
<data key="sku" unique="suffix">api-simple-product</data>
295+
<data key="type_id">simple</data>
296+
<data key="attribute_set_id">4</data>
297+
<data key="visibility">4</data>
298+
<data key="name" unique="suffix">Api Simple Product</data>
299+
<data key="price">1.00</data>
300+
</entity>
301+
<entity name="ApiSimplePrice100" type="product">
302+
<data key="sku" unique="suffix">api-simple-product</data>
303+
<data key="type_id">simple</data>
304+
<data key="attribute_set_id">4</data>
305+
<data key="visibility">4</data>
306+
<data key="name" unique="suffix">Api Simple Product</data>
307+
<data key="price">100.00</data>
308+
</entity>
284309
</entities>

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
<data key="price_type">fixed</data>
1919
<data key="max_characters">0</data>
2020
</entity>
21+
<entity name="ProductOptionField2" type="product_option">
22+
<var key="product_sku" entityType="product" entityKey="sku" />
23+
<data key="title">OptionField2</data>
24+
<data key="type">field</data>
25+
<data key="is_require">true</data>
26+
<data key="sort_order">1</data>
27+
<data key="price">20</data>
28+
<data key="price_type">fixed</data>
29+
<data key="max_characters">0</data>
30+
</entity>
2131
<entity name="ProductOptionArea" type="product_option">
2232
<var key="product_sku" entityType="product" entityKey="sku" />
2333
<data key="title">OptionArea</data>

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

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@
6060
</object>
6161
<field key="saveOptions">boolean</field>
6262
</operation>
63-
<operation name="deleteProduct" dataType="product" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
63+
<operation name="DeleteProduct" dataType="product" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
64+
<contentType>application/json</contentType>
65+
</operation>
66+
<operation name="GetProduct" dataType="product" type="get" auth="adminOauth" url="/V1/products/{sku}" method="GET">
6467
<contentType>application/json</contentType>
6568
</operation>
6669
<operation name="CreateProduct2" dataType="product2" type="create" auth="adminOauth" url="/V1/products" method="POST">
@@ -115,7 +118,43 @@
115118
</object>
116119
<field key="saveOptions">boolean</field>
117120
</operation>
118-
<operation name="deleteProduct2" dataType="product2" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
121+
<operation name="DeleteProduct2" dataType="product2" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
122+
<contentType>application/json</contentType>
123+
</operation>
124+
<operation name="GetProduct2" dataType="product2" type="get" auth="adminOauth" url="/V1/products/{sku}" method="GET">
125+
<contentType>application/json</contentType>
126+
</operation>
127+
<!-- Data type product3 is to work around MQE-1035 -->
128+
<operation name="CreateProduct3" dataType="product3" type="create" auth="adminOauth" url="/V1/products" method="POST">
129+
<contentType>application/json</contentType>
130+
<object dataType="product3" key="product">
131+
<field key="sku">string</field>
132+
<field key="name">string</field>
133+
<field key="attribute_set_id">integer</field>
134+
<field key="price">number</field>
135+
<field key="status">integer</field>
136+
<field key="visibility">integer</field>
137+
<field key="type_id">string</field>
138+
<field key="created_at">string</field>
139+
<field key="updated_at">string</field>
140+
<field key="weight">integer</field>
141+
<field key="extension_attributes">product_extension_attribute</field>
142+
<array key="product_links">
143+
<value>product_link</value>
144+
</array>
145+
<array key="custom_attributes">
146+
<value>custom_attribute_array</value>
147+
</array>
148+
<array key="options">
149+
<value>product_option</value>
150+
</array>
151+
</object>
152+
</operation>
153+
<!-- Data type product3 is to work around MQE-1035 -->
154+
<operation name="DeleteProduct3" dataType="product3" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
155+
<contentType>application/json</contentType>
156+
</operation>
157+
<operation name="GetProduct3" dataType="product3" type="get" auth="adminOauth" url="/V1/products/{sku}" method="GET">
119158
<contentType>application/json</contentType>
120159
</operation>
121160
</operations>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
<field key="linked_product_sku">string</field>
1515
<field key="linked_product_type">string</field>
1616
<field key="position">integer</field>
17-
<array key="extension_attributes">
18-
<value>product_link_extension_attribute</value>
19-
</array>
17+
<object key="extension_attributes" dataType="product_link_extension_attribute">
18+
<field key="qty">integer</field>
19+
</object>
2020
</operation>
2121
<operation name="UpdateProductLink" dataType="product_link" type="update">
2222
<field key="sku">string</field>
2323
<field key="link_type">string</field>
2424
<field key="linked_product_sku">string</field>
2525
<field key="linked_product_type">string</field>
2626
<field key="position">integer</field>
27-
<array key="extension_attributes">
28-
<value>product_link_extension_attribute</value>
29-
</array>
27+
<object key="extension_attributes" dataType="product_link_extension_attribute">
28+
<field key="qty">integer</field>
29+
</object>
3030
</operation>
3131
</operations>

0 commit comments

Comments
 (0)