Skip to content

Commit a878680

Browse files
committed
B2B-1645: Add MFTF test for MC-38325 & MC-38947
- Moving data entities to correct modules - Updating downloadable data
1 parent 7f7e2af commit a878680

File tree

8 files changed

+181
-105
lines changed

8 files changed

+181
-105
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdobeBaseContentExportImport" extends="AdobeBaseContent" type="ImageContent">
12+
<data key="name">adobe-base.jpg</data>
13+
</entity>
14+
<entity name="ApiProductAttributeMediaGalleryForExportImport3" extends="ApiProductAttributeMediaGalleryEntryTestImage2" type="ProductAttributeMediaGalleryEntry">
15+
<data key="label">Adobe Base</data>
16+
<requiredEntity type="ImageContent">AdobeBaseContentExportImport</requiredEntity>
17+
</entity>
18+
</entities>

app/code/Magento/DownloadableImportExport/Test/Mftf/Data/ImportData.xml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,36 @@
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<!-- Categories -->
12+
<entity name="ImportCategory_Downloadable_UrlLinks" type="category">
13+
<data key="name">import-category-downloadable-url-links</data>
14+
<data key="name_lwr">import-category-downloadable-url-links</data>
15+
<data key="is_active">true</data>
16+
<data key="include_in_menu">true</data>
17+
<data key="urlKey">import-category-downloadable-url-links</data>
18+
</entity>
19+
<entity name="ImportCategory_Downloadable_FileLinks" type="category">
20+
<data key="name">import-category-downloadable-file-links</data>
21+
<data key="name_lwr">import-category-downloadable-file-links</data>
22+
<data key="is_active">true</data>
23+
<data key="include_in_menu">true</data>
24+
<data key="urlKey">import-category-downloadable-file-links</data>
25+
</entity>
26+
1127
<!-- Products -->
12-
<entity name="ImportDownloadableProduct_UrlLinks" type="product">
28+
<entity name="ImportProduct_Downloadable_UrlLinks" type="product">
1329
<data key="fileName">import_downloadable_product_url_links.csv</data>
1430
<data key="importSummary">Created: 1, Updated: 0, Deleted: 0</data>
15-
<data key="sku">import-downloadable-url-links</data>
31+
<data key="sku">import-product-downloadable-url-links</data>
1632
<data key="type_id">downloadable</data>
1733
<data key="attribute_set_id">4</data>
18-
<data key="name">import-downloadable-url-links</data>
34+
<data key="name">import-product-downloadable-url-links</data>
1935
<data key="price">99.00</data>
2036
<data key="quantity">100</data>
21-
<data key="weight">0</data>
37+
<data key="weight"/>
38+
<data key="visibilityText">Catalog, Search</data>
2239
<data key="status">1</data>
23-
<data key="urlKey">import-downloadable-url-links</data>
40+
<data key="urlKey">import-product-downloadable-url-links</data>
2441
<data key="linksTitle">Links</data>
2542
<data key="linkTitle">Link1</data>
2643
<data key="linkPrice">2.00</data>
@@ -39,18 +56,19 @@
3956
<data key="sampleFileUrl">https://static.magento.com/sites/all/themes/mag_redesign/images/magento-logo.svg</data>
4057
<data key="sampleFileName">magento-logo</data>
4158
</entity>
42-
<entity name="ImportDownloadableProduct_FileLinks" type="product">
59+
<entity name="ImportProduct_Downloadable_FileLinks" type="product">
4360
<data key="fileName">import_downloadable_product_file_links.csv</data>
4461
<data key="importSummary">Created: 1, Updated: 0, Deleted: 0</data>
45-
<data key="sku">import_downloadable_product_file_links</data>
62+
<data key="sku">import-product-downloadable-file-links</data>
4663
<data key="type_id">downloadable</data>
4764
<data key="attribute_set_id">4</data>
48-
<data key="name">import-downloadable-file-links</data>
65+
<data key="name">import-product-downloadable-file-links</data>
4966
<data key="price">100.00</data>
5067
<data key="quantity">100</data>
51-
<data key="weight">0</data>
68+
<data key="weight"/>
69+
<data key="visibilityText">Catalog, Search</data>
5270
<data key="status">1</data>
53-
<data key="urlKey">import-downloadable-file-links</data>
71+
<data key="urlKey">import-product-downloadable-file-links</data>
5472
<data key="linksTitle">Links</data>
5573
<data key="linkTitle">Link1</data>
5674
<data key="linkPrice">3.00</data>

0 commit comments

Comments
 (0)