Skip to content

Commit 3f41e45

Browse files
committed
B2B-1650: Add MFTF test for MC-38248
- Moving MFTF entities to correct modules - Updating import for Configurable product test - Updating import for gift card product test
1 parent 124600d commit 3f41e45

File tree

11 files changed

+545
-300
lines changed

11 files changed

+545
-300
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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="AdminAssertProductInfoOnEditPageActionGroup">
12+
<annotations>
13+
<description>Verifies the general data on the Edit product details page in admin for a product.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productStatus" defaultValue="{{_defaultProduct.status}}" type="string"/>
17+
<argument name="productAttributeSet" defaultValue="Default" type="string"/>
18+
<argument name="productName" defaultValue="{{_defaultProduct.name}}" type="string"/>
19+
<argument name="productSku" defaultValue="{{_defaultProduct.sku}}" type="string"/>
20+
<argument name="productPrice" defaultValue="{{_defaultProduct.price}}" type="string"/>
21+
<argument name="productQuantity" defaultValue="{{_defaultProduct.quantity}}" type="string"/>
22+
<argument name="productStockStatus" defaultValue="In Stock" type="string"/>
23+
<argument name="productWeight" defaultValue="{{_defaultProduct.weight}}" type="string"/>
24+
<argument name="productVisibility" defaultValue="Catalog, Search" type="string"/>
25+
<argument name="categoryNames" defaultValue="{{_defaultCategory.name}}" type="string"/>
26+
</arguments>
27+
<waitForElementVisible selector="{{AdminProductFormSection.productStatus}}" stepKey="waitForProductStatus"/>
28+
<seeElement selector="{{AdminProductFormSection.productStatusValue(productStatus)}}" stepKey="seeProductStatus"/>
29+
<seeOptionIsSelected selector="{{AdminProductFormSection.attributeSet}}" userInput="{{productAttributeSet}}" stepKey="seeProductAttributeSet"/>
30+
<seeInField selector="{{AdminProductFormSection.productName}}" userInput="{{productName}}" stepKey="seeProductName"/>
31+
<seeInField selector="{{AdminProductFormSection.productSku}}" userInput="{{productSku}}" stepKey="seeProductSku"/>
32+
<seeInField selector="{{AdminProductFormSection.productPrice}}" userInput="{{productPrice}}" stepKey="seeProductPrice"/>
33+
<seeInField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{productQuantity}}" stepKey="seeProductQuantity"/>
34+
<seeInField selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{productStockStatus}}" stepKey="seeProductStockStatus"/>
35+
<seeInField selector="{{AdminProductFormSection.productWeight}}" userInput="{{productWeight}}" stepKey="seeProductWeight"/>
36+
<seeOptionIsSelected selector="{{AdminProductFormSection.visibility}}" userInput="{{productVisibility}}" stepKey="seeProductVisibility"/>
37+
<seeElement selector="{{AdminProductFormSection.categories(categoryNames)}}" stepKey="seeProductCategories"/>
38+
</actionGroup>
39+
</actionGroups>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
<!-- Product Attributes -->
12+
<entity name="ProductAttributeFrontendLabelImport1" type="FrontendLabel">
13+
<data key="store_id">0</data>
14+
<data key="label">import_attribute1</data>
15+
</entity>
16+
<entity name="ProductAttributeWithThreeOptionsForImport" extends="productAttributeDropdownTwoOptions" type="ProductAttribute">
17+
<data key="attribute_code">import_attribute1</data>
18+
<requiredEntity type="FrontendLabel">ProductAttributeFrontendLabelImport1</requiredEntity>
19+
</entity>
20+
<entity name="ProductAttributeOptionThreeForImport" extends="productAttributeOption3" type="ProductAttributeOption">
21+
<data key="label">option3</data>
22+
</entity>
23+
24+
<!-- Images -->
25+
<entity name="TestImageImageContentExportImport" extends="TestImageContent" type="ImageContent">
26+
<data key="name">test_image.jpg</data>
27+
</entity>
28+
<entity name="AdobeBaseContentExportImport" extends="AdobeBaseContent" type="ImageContent">
29+
<data key="name">adobe-base.jpg</data>
30+
</entity>
31+
<entity name="ApiProductAttributeMediaGalleryForExportImport2" extends="ApiProductAttributeMediaGalleryEntryTestImage" type="ProductAttributeMediaGalleryEntry">
32+
<data key="label">Test Image</data>
33+
<requiredEntity type="ImageContent">TestImageImageContentExportImport</requiredEntity>
34+
</entity>
35+
<entity name="ApiProductAttributeMediaGalleryForExportImport3" extends="ApiProductAttributeMediaGalleryEntryTestImage2" type="ProductAttributeMediaGalleryEntry">
36+
<data key="label">Adobe Base</data>
37+
<requiredEntity type="ImageContent">AdobeBaseContentExportImport</requiredEntity>
38+
</entity>
39+
</entities>
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
<!-- Categories -->
12+
<entity name="ImportCategory_Configurable" type="category">
13+
<data key="name">import-category-configurable</data>
14+
<data key="name_lwr">import-category-configurable</data>
15+
<data key="is_active">true</data>
16+
<data key="include_in_menu">true</data>
17+
<data key="urlKey">import-category-configurable</data>
18+
</entity>
19+
20+
<!-- Products -->
21+
<entity name="ImportProductSimple1_Configurable" type="product">
22+
<data key="name">import-product-simple1-configurable</data>
23+
<data key="sku">import-product-simple1-configurable</data>
24+
<data key="type_id">simple</data>
25+
<data key="attribute_set_id">4</data>
26+
<data key="price">11.00</data>
27+
<data key="visibilityText">Not Visible Individually</data>
28+
<data key="status">1</data>
29+
<data key="statusText">Enabled</data>
30+
<data key="quantity">101</data>
31+
<data key="urlKey">import-product-simple1-configurable</data>
32+
<data key="weight">1</data>
33+
<data key="thumbnailImage">/m/a/magento-logo</data>
34+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
35+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
36+
</entity>
37+
<entity name="ImportProductSimple2_Configurable" type="product">
38+
<data key="name">import-product-simple2-configurable</data>
39+
<data key="sku">import-product-simple2-configurable</data>
40+
<data key="type_id">simple</data>
41+
<data key="attribute_set_id">4</data>
42+
<data key="price">12.00</data>
43+
<data key="visibilityText">Not Visible Individually</data>
44+
<data key="status">1</data>
45+
<data key="statusText">Enabled</data>
46+
<data key="quantity">102</data>
47+
<data key="urlKey">import-product-simple2-configurable</data>
48+
<data key="weight">2</data>
49+
<data key="thumbnailImage">/t/e/test_image</data>
50+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
51+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
52+
</entity>
53+
<entity name="ImportProductSimple3_Configurable" type="product">
54+
<data key="name">import-product-simple3-configurable</data>
55+
<data key="sku">import-product-simple3-configurable</data>
56+
<data key="type_id">simple</data>
57+
<data key="attribute_set_id">4</data>
58+
<data key="price">13.00</data>
59+
<data key="visibilityText">Not Visible Individually</data>
60+
<data key="status">1</data>
61+
<data key="statusText">Enabled</data>
62+
<data key="quantity">103</data>
63+
<data key="urlKey">import-product-simple3-configurable</data>
64+
<data key="weight">3</data>
65+
<data key="thumbnailImage">/a/d/adobe-base</data>
66+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
67+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
68+
</entity>
69+
<entity name="ImportProduct_Configurable" type="product">
70+
<data key="fileName">import_configurable_product.csv</data>
71+
<data key="importSummary">Created: 4, Updated: 0, Deleted: 0</data>
72+
<data key="name">import-product-configurable</data>
73+
<data key="sku">import-product-configurable</data>
74+
<data key="type_id">configurable</data>
75+
<data key="attribute_set_id">4</data>
76+
<data key="price"/>
77+
<data key="visibilityText">Catalog, Search</data>
78+
<data key="status">1</data>
79+
<data key="quantity"/>
80+
<data key="urlKey">import-product-configurable</data>
81+
<data key="weight"/>
82+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
83+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
84+
</entity>
85+
</entities>

0 commit comments

Comments
 (0)