Skip to content

Commit 3770d95

Browse files
[Magento Community Engineering] Community Contributions - 2.4-develop
- merged latest code from mainline branch
2 parents 2463577 + 00a70ec commit 3770d95

File tree

41 files changed

+2120
-91
lines changed

Some content is hidden

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

41 files changed

+2120
-91
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AwsS3AdminImportSimpleAndConfigurableProductsWithAssignedImagesTest" extends="AdminImportSimpleAndConfigurableProductsWithAssignedImagesTest">
12+
<annotations>
13+
<features value="AwsS3"/>
14+
<stories value="Import Products"/>
15+
<title value="S3 - Import Configurable Product With Simple Child Products With Images"/>
16+
<description value="Imports a .csv file containing a configurable product with 3 child simple products that
17+
have images. Verifies that products are imported successfully and that the images are attached to the
18+
products as expected."/>
19+
<severity value="MAJOR"/>
20+
<group value="importExport"/>
21+
<group value="remote_storage_aws_s3"/>
22+
<skip>
23+
<issueId value="MC-39280"/>
24+
</skip>
25+
</annotations>
26+
27+
<before>
28+
<!-- Enable AWS S3 Remote Storage -->
29+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage"/>
30+
</before>
31+
32+
<after>
33+
<!-- Disable AWS S3 Remote Storage -->
34+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage"/>
35+
</after>
36+
</test>
37+
</tests>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9+
<actionGroup name="StorefrontNavigateToCategoryUrlActionGroup">
10+
<annotations>
11+
<description>Goes to the Storefront Category page for the provided Category URL.</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="categoryUrl" type="string"/>
15+
</arguments>
16+
<amOnPage url="{{StorefrontCategoryPage.url(categoryUrl)}}" stepKey="goToStorefrontCategoryPage"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontProductPageSelectDropDownOptionValueActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
</arguments>
1919

2020
<selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelect(attributeLabel)}}" userInput="{{optionLabel}}" stepKey="fillDropDownAttributeOption"/>
21+
<waitForPageLoad stepKey="waitForPageLoad"/>
2122
</actionGroup>
2223
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<element name="imageFileUpload" type="input" selector="#fileupload"/>
1414
<element name="imageUploadButton" type="button" selector="div.image div.fileinput-button"/>
1515
<element name="imageFile" type="text" selector="//*[@id='media_gallery_content']//img[contains(@src, '{{url}}')]" parameterized="true"/>
16+
<element name="imageElement" type="text" selector="#media_gallery_content img"/>
1617
<element name="removeImageButton" type="button" selector=".action-remove"/>
1718
<element name="removeImageButtonForExactImage" type="button" selector="[id='media_gallery_content'] img[src*='{{imageName}}'] + div[class='actions'] button[class='action-remove']" parameterized="true"/>
1819
<element name="modalOkBtn" type="button" selector="button.action-primary.action-accept"/>

app/code/Magento/Config/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696

9797
<virtualType name="systemConfigQueryLocker" type="Magento\Framework\Cache\LockGuardedCacheLoader">
9898
<arguments>
99-
<argument name="locker" xsi:type="object">Magento\Framework\Lock\Backend\Database</argument>
99+
<argument name="locker" xsi:type="object">Magento\Framework\Lock\Proxy</argument>
100100
</arguments>
101101
</virtualType>
102102

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminClickCheckDataImportActionGroup">
12+
<annotations>
13+
<description>Clicks the 'Check Data' button on the Admin Import page.</description>
14+
</annotations>
15+
<waitForElementVisible selector="{{AdminImportHeaderSection.checkDataButton}}" stepKey="waitForCheckDataButton"/>
16+
<click selector="{{AdminImportHeaderSection.checkDataButton}}" stepKey="clickCheckDataButton"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AdminClickImportActionGroup">
12+
<annotations>
13+
<description>Clicks the 'Import' button on the Admin Import page.</description>
14+
</annotations>
15+
<waitForElementVisible selector="{{AdminImportMainSection.importButton}}" stepKey="waitForImportButton"/>
16+
<click selector="{{AdminImportMainSection.importButton}}" stepKey="clickImportButton"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
<waitForElementVisible selector="{{AdminImportValidationMessagesSection.notice}}" stepKey="waitForNoticeMessage"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 30 additions & 0 deletions
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminFillImportFormActionGroup">
12+
<annotations>
13+
<description>Fills the form on the System > Data Transfer > Import page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="entityType" defaultValue="Products" type="string"/>
17+
<argument name="importBehavior" defaultValue="Add/Update" type="string"/>
18+
<argument name="validationStrategy" defaultValue="Stop on Error" type="string" />
19+
<argument name="allowedErrorsCount" defaultValue="10" type="string" />
20+
<argument name="importFile" type="string"/>
21+
</arguments>
22+
<waitForElementVisible selector="{{AdminImportMainSection.entityType}}" stepKey="waitForEntityType"/>
23+
<selectOption selector="{{AdminImportMainSection.entityType}}" userInput="{{entityType}}" stepKey="selectEntityType"/>
24+
<waitForElementVisible selector="{{AdminImportMainSection.importBehavior}}" stepKey="waitForImportBehavior"/>
25+
<selectOption selector="{{AdminImportMainSection.importBehavior}}" userInput="{{importBehavior}}" stepKey="selectImportBehaviorOption"/>
26+
<selectOption selector="{{AdminImportMainSection.validationStrategy}}" userInput="{{validationStrategy}}" stepKey="selectValidationStrategyOption"/>
27+
<fillField selector="{{AdminImportMainSection.allowedErrorsCount}}" userInput="{{allowedErrorsCount}}" stepKey="fillAllowedErrorsCountField"/>
28+
<attachFile selector="{{AdminImportMainSection.selectFileToImport}}" userInput="{{importFile}}" stepKey="attachFileForImport"/>
29+
</actionGroup>
30+
</actionGroups>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminNavigateToImportHistoryPageActionGroup">
12+
<annotations>
13+
<description>Navigates to the admin System > Data Transfer > Import History page.</description>
14+
</annotations>
15+
<amOnPage url="{{AdminImportHistoryPage.url}}" stepKey="navigateToImportHistoryPage"/>
16+
</actionGroup>
17+
</actionGroups>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminNavigateToImportPageActionGroup">
12+
<annotations>
13+
<description>Navigates to the admin System > Data Transfer > Import page.</description>
14+
</annotations>
15+
<amOnPage url="{{AdminImportIndexPage.url}}" stepKey="navigateToImportPage"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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+
<!-- Common Messages -->
12+
<entity name="ImportCommonMessages">
13+
<data key="validFile">File is valid! To start import process press &quot;Import&quot; button</data>
14+
<data key="success">Import successfully done</data>
15+
</entity>
16+
17+
<!-- Categories -->
18+
<entity name="Import1" type="category">
19+
<data key="name">Import1</data>
20+
<data key="name_lwr">import1</data>
21+
<data key="is_active">true</data>
22+
<data key="include_in_menu">true</data>
23+
</entity>
24+
25+
<!-- Products -->
26+
<entity name="ImportSimple1" type="product">
27+
<data key="name">import-simple1</data>
28+
<data key="sku">import-simple1</data>
29+
<data key="type_id">simple</data>
30+
<data key="attribute_set_id">4</data>
31+
<data key="price">12.00</data>
32+
<data key="visibility">4</data>
33+
<data key="status">1</data>
34+
<data key="quantity">100</data>
35+
<data key="urlKey">import-simple1</data>
36+
<data key="weight">12</data>
37+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
38+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
39+
</entity>
40+
<entity name="ImportSimple2" type="product">
41+
<data key="name">import-simple2</data>
42+
<data key="sku">import-simple2</data>
43+
<data key="type_id">simple</data>
44+
<data key="attribute_set_id">4</data>
45+
<data key="price">15.00</data>
46+
<data key="visibility">4</data>
47+
<data key="status">1</data>
48+
<data key="quantity">100</data>
49+
<data key="urlKey">import-simple2</data>
50+
<data key="weight">12</data>
51+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
52+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
53+
</entity>
54+
<entity name="ImportSimple3" type="product">
55+
<data key="name">import-simple3</data>
56+
<data key="sku">import-simple3</data>
57+
<data key="type_id">simple</data>
58+
<data key="attribute_set_id">4</data>
59+
<data key="price">10.00</data>
60+
<data key="visibility">4</data>
61+
<data key="status">1</data>
62+
<data key="quantity">100</data>
63+
<data key="urlKey">import-simple3</data>
64+
<data key="weight">12</data>
65+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
66+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
67+
</entity>
68+
<entity name="ImportConfigurable" type="product">
69+
<data key="fileName">import_configurable_product.csv</data>
70+
<data key="importSummary">Created: 4, Updated: 0, Deleted: 0</data>
71+
<data key="name">import-configurable</data>
72+
<data key="sku">import-configurable</data>
73+
<data key="type_id">configurable</data>
74+
<data key="attribute_set_id">4</data>
75+
<data key="price"/>
76+
<data key="visibility">4</data>
77+
<data key="status">1</data>
78+
<data key="quantity"/>
79+
<data key="urlKey">import-configurable</data>
80+
<data key="weight">12</data>
81+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
82+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
83+
</entity>
84+
85+
<!-- Product Attributes -->
86+
<entity name="ProductAttributeFrontendLabelImport1" type="FrontendLabel">
87+
<data key="store_id">0</data>
88+
<data key="label">import_attribute1</data>
89+
</entity>
90+
<entity name="ProductAttributeWithThreeOptionsForImport" extends="productAttributeDropdownTwoOptions" type="ProductAttribute">
91+
<data key="attribute_code">import_attribute1</data>
92+
<requiredEntity type="FrontendLabel">ProductAttributeFrontendLabelImport1</requiredEntity>
93+
</entity>
94+
<entity name="ProductAttributeOptionThreeForImport" extends="productAttributeOption3" type="ProductAttributeOption">
95+
<data key="label">option3</data>
96+
</entity>
97+
98+
<!-- Images -->
99+
<entity name="TestImageImageContentExportImport" extends="TestImageContent" type="ImageContent">
100+
<data key="name">test_image.jpg</data>
101+
</entity>
102+
<entity name="ApiProductAttributeMediaGalleryForExportImport2" extends="ApiProductAttributeMediaGalleryEntryTestImage" type="ProductAttributeMediaGalleryEntry">
103+
<data key="label">Test Image</data>
104+
<requiredEntity type="ImageContent">TestImageImageContentExportImport</requiredEntity>
105+
</entity>
106+
</entities>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="AdminImportHistoryPage" url="admin/history" area="admin" module="Magento_ImportExport"/>
12+
</pages>

0 commit comments

Comments
 (0)