Skip to content

Commit d6a041f

Browse files
committed
Merge branch 'ACQE-7004' into ACQE-7152-mainline-functional-tests-deployment
2 parents 28eac7e + ed44fd9 commit d6a041f

6 files changed

+385
-3
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminAddImageCategoryAtAllStoreViewActionGroup">
11+
<annotations>
12+
<description>Requires navigation to the Category creation/edit page. Adds the provided image to a Category.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="image" defaultValue="ProductImage"/>
16+
</arguments>
17+
<conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
18+
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
19+
<waitForElementVisible selector="{{AdminCategoryContentSection.uploadButton}}" stepKey="seeImageSectionIsReady"/>
20+
<attachFile selector="{{AdminCategoryContentSection.uploadImageFile}}" userInput="{{image.file}}" stepKey="uploadFile"/>
21+
<waitForPageLoad stepKey="waitForFileUpload1"/>
22+
</actionGroup>
23+
</actionGroups>
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 2024 Adobe
5+
* All Rights Reserved.
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="AdminAssertCategoryImageActionGroup">
10+
<annotations>
11+
<description>Assert category image on admin.</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="image" type="entity"/>
15+
</arguments>
16+
<conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
17+
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
18+
<waitForElementVisible selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="waitForLoading"/>
19+
<grabTextFrom selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="grabCategoryFileName"/>
20+
<assertRegExp stepKey="assertEquals" message="pass">
21+
<expectedResult type="string">/{{image.filename}}(_[0-9]+)*?\.(jpg|png)$/</expectedResult>
22+
<actualResult type="variable">grabCategoryFileName</actualResult>
23+
</assertRegExp>
24+
</actionGroup>
25+
</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 2024 Adobe
5+
* All Rights Reserved.
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="AdminAssertCategoryNoImageActionGroup">
10+
<annotations>
11+
<description>Assert category no image on admin.</description>
12+
</annotations>
13+
<conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
14+
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
15+
<dontSee selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="dontSeeImage"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminChangeCategoryImageOnStoreviewActionGroup">
11+
<annotations>
12+
<description>Requires navigation to the Category creation/edit page. Adds the provided image to a Category. Validates that the Image exists.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="image" defaultValue="ProductImage"/>
16+
</arguments>
17+
<conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
18+
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
19+
<uncheckOption selector="{{AdminCategoryContentSection.categoryImageUseDefault}}" stepKey="uncheckUseDefaultValueStoreView"/>
20+
<waitForElementVisible selector="{{AdminCategoryContentSection.uploadButton}}" stepKey="seeImageSectionIsReady"/>
21+
<attachFile selector="{{AdminCategoryContentSection.uploadImageFile}}" userInput="{{image.file}}" stepKey="uploadFile"/>
22+
<waitForPageLoad stepKey="waitForFileUpload1"/>
23+
</actionGroup>
24+
</actionGroups>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
8-
98
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
109
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1110
<section name="AdminCategoryContentSection">
@@ -26,5 +25,6 @@
2625
<element name="productTableRow" type="button" selector="#catalog_category_products_table tbody tr"/>
2726
<element name="productSearch" type="button" selector="//button[@data-action='grid-filter-apply']" timeout="30"/>
2827
<element name="productTableColumnSku" type="input" selector="#catalog_category_products_filter_sku"/>
28+
<element name="categoryImageUseDefault" type="checkbox" selector="input[name='use_default[image]']"/>
2929
</section>
3030
</sections>

0 commit comments

Comments
 (0)