Skip to content

Commit b3024d5

Browse files
committed
Merge branch 'MAGETWO-85932' into 2.2-develop-pr7
2 parents 570eeed + 82d2033 commit b3024d5

File tree

4 files changed

+77
-0
lines changed

4 files changed

+77
-0
lines changed
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKey">
12+
<arguments>
13+
<argument name="product"/>
14+
</arguments>
15+
<!-- Go to storefront product page, assert product name and sku -->
16+
<amOnPage url="{{product.custom_attributes[url_key]}}.html" stepKey="navigateToProductPage"/>
17+
<waitForPageLoad stepKey="waitForPageLoad2"/>
18+
<seeInTitle userInput="{{product.name}}" stepKey="assertProductNameTitle"/>
19+
<see userInput="{{product.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/>
20+
<see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="CatalogAttributeSet" type="CatalogAttributeSet">
12+
<data key="attribute_set_name" unique="suffix">test_set_</data>
13+
<data key="attributeGroupId">7</data>
14+
<data key="skeletonId">4</data>
15+
</entity>
16+
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,18 @@
249249
<var key="sku" entityType="product" entityKey="sku" />
250250
<requiredEntity type="product_option">ProductOptionDropDownWithLongValuesTitle</requiredEntity>
251251
</entity>
252+
<entity name="SimpleProductWithCustomAttributeSet" type="product">
253+
<data key="sku" unique="suffix">testSku</data>
254+
<data key="type_id">simple</data>
255+
<var key="attribute_set_id" entityKey="attribute_set_id" entityType="CatalogAttributeSet"/>
256+
<data key="visibility">4</data>
257+
<data key="name" unique="suffix">testProductName</data>
258+
<data key="price">123.00</data>
259+
<data key="urlKey" unique="suffix">testurlkey</data>
260+
<data key="status">1</data>
261+
<data key="weight">1</data>
262+
<data key="quantity">100</data>
263+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
264+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
265+
</entity>
252266
</entities>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
11+
<operation name="AddCatalogAttributeToAttributeSet" dataType="CatalogAttributeSet" type="create" auth="adminOauth" url="/V1/products/attribute-sets" method="POST">
12+
<contentType>application/json</contentType>
13+
<object key="attributeSet" dataType="CatalogAttributeSet">
14+
<field key="attribute_set_name">string</field>
15+
<field key="sort_order">integer</field>
16+
</object>
17+
<field key="skeletonId">integer</field>
18+
</operation>
19+
<operation name="DeleteCatalogAttributeFromAttributeSet" dataType="CatalogAttributeSet" type="delete" auth="adminOauth" url="/V1/products/attribute-sets/{attribute_set_id}" method="DELETE">
20+
<contentType>application/json</contentType>
21+
</operation>
22+
<operation name="GetCatalogAttributesFromDefaultSet" dataType="CatalogAttributeSet" type="get" auth="adminOauth" url="/V1/products/attribute-sets/{attribute_set_id}" method="GET">
23+
<contentType>application/json</contentType>
24+
</operation>
25+
</operations>

0 commit comments

Comments
 (0)