Skip to content

Commit 49c8cbe

Browse files
jilu1tomreece
authored andcommitted
MQE-440: Added configurable product related metadata, data, and a sample test.
1 parent 8dc0090 commit 49c8cbe

30 files changed

+545
-56
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@
1818
<data key="name_lwr" unique="suffix">simplesubcategory</data>
1919
<data key="is_active">true</data>
2020
<data key="include_in_menu">true</data>
21-
<!--required-entity type="custom_attribute">CustomAttributeCategoryUrlKey</required-entity-->
2221
</entity>
2322
</config>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@
2020
<data key="attribute_code">category_ids</data>
2121
<var key="value" entityType="category" entityKey="id"/>
2222
</entity>
23+
<entity name="CustomAttributeProductAttribute" type="custom_attribute">
24+
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
25+
<var key="value" entityKey="value" entityType="ProductAttributeOption"/>
26+
</entity>
2327
</config>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

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/dataProfileSchema.xsd">
11-
<entity name="CustomAttributeSimple" type="custom_attribute">
12-
<data key="attribute_code">100</data>
13-
<data key="value">test</data>
11+
<entity name="ProductAttributeFrontendLabel" type="FrontendLabel">
12+
<data key="store_id">0</data>
13+
<data key="label" unique="suffix">attribute</data>
1414
</entity>
1515
</config>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
<config 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="productAttributeWithTwoOptions" type="ProductAttribute">
12+
<data key="attribute_code" unique="suffix">attribute</data>
13+
<data key="frontend_input">select</data>
14+
<data key="scope">global</data>
15+
<data key="is_required">false</data>
16+
<data key="is_unique">false</data>
17+
<data key="is_searchable">true</data>
18+
<data key="is_visible">true</data>
19+
<data key="is_visible_in_advanced_search">true</data>
20+
<data key="is_visible_on_front">true</data>
21+
<data key="is_filterable">true</data>
22+
<data key="is_filterable_in_search">true</data>
23+
<data key="used_in_product_listing">true</data>
24+
<data key="is_used_for_promo_rules">true</data>
25+
<data key="is_comparable">true</data>
26+
<data key="is_used_in_grid">true</data>
27+
<data key="is_visible_in_grid">true</data>
28+
<data key="is_filterable_in_grid">true</data>
29+
<data key="used_for_sort_by">true</data>
30+
<required-entity type="FrontendLabel">ProductAttributeFrontendLabel</required-entity>
31+
</entity>
32+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
<config 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="productAttributeOption1" type="ProductAttributeOption">
12+
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
13+
<data key="label" unique="suffix">option1</data>
14+
<data key="is_default">false</data>
15+
<data key="sort_order">0</data>
16+
<required-entity type="StoreLabel">Option1Store0</required-entity>
17+
<required-entity type="StoreLabel">Option1Store1</required-entity>
18+
</entity>
19+
<entity name="productAttributeOption2" type="ProductAttributeOption">
20+
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
21+
<data key="label" unique="suffix">option2</data>
22+
<data key="is_default">true</data>
23+
<data key="sort_order">1</data>
24+
<required-entity type="StoreLabel">Option2Store0</required-entity>
25+
<required-entity type="StoreLabel">Option2Store1</required-entity>
26+
</entity>
27+
<entity name="ProductAttributeOptionGetter" type="ProductAttributeOption">
28+
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
29+
</entity>
30+
</config>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<config 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="AddToDefaultSet" type="ProductAttributeSet">
12+
<var key="attributeCode" entityKey="attribute_code" entityType="ProductAttribute"/>
13+
<data key="attributeSetId">4</data>
14+
<data key="attributeGroupId">7</data>
15+
<data key="sortOrder">0</data>
16+
</entity>
17+
</config>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
<config 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="Option1Store0" type="StoreLabel">
12+
<data key="store_id">0</data>
13+
<data key="label">option1</data>
14+
</entity>
15+
<entity name="Option1Store1" type="StoreLabel">
16+
<data key="store_id">1</data>
17+
<data key="label">option1</data>
18+
</entity>
19+
<entity name="Option2Store0" type="StoreLabel">
20+
<data key="store_id">0</data>
21+
<data key="label">option2</data>
22+
</entity>
23+
<entity name="Option2Store1" type="StoreLabel">
24+
<data key="store_id">1</data>
25+
<data key="label">option2</data>
26+
</entity>
27+
</config>
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+
<config 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="CreateFrontendLabel" dataType="FrontendLabel" type="create">
12+
<field key="store_id">integer</field>
13+
<field key="label">string</field>
14+
</operation>
15+
</config>

0 commit comments

Comments
 (0)