Skip to content

Commit 959047d

Browse files
author
Bohdan Shevchenko
committed
MC-36956: Create automated test for "Upload Category Image"
1 parent bc8e51d commit 959047d

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminUploadCategoryImageTest">
11+
<annotations>
12+
<features value="Catalog"/>
13+
<stories value="Add/remove images and videos for all product types and category"/>
14+
<title value="Upload Category Image"/>
15+
<description value="The test verifies uploading images including a special case of image name with spaces"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MC-26112"/>
18+
<group value="catalog"/>
19+
</annotations>
20+
21+
<before>
22+
<createData entity="_defaultCategory" stepKey="createCategory"/>
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
</before>
25+
26+
<after>
27+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
28+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
29+
</after>
30+
31+
<!--Go to created category admin page and upload image-->
32+
<actionGroup ref="GoToAdminCategoryPageByIdActionGroup" stepKey="goToAdminCategoryPage">
33+
<argument name="id" value="$createCategory.id$"/>
34+
</actionGroup>
35+
<actionGroup ref="AddCategoryImageActionGroup" stepKey="addCategoryImage"/>
36+
<actionGroup ref="CheckCategoryImageInAdminActionGroup" stepKey="checkCategoryImageInAdmin"/>
37+
<!--Remove and upload new image-->
38+
<actionGroup ref="RemoveCategoryImageActionGroup" stepKey="removeCategoryImage"/>
39+
<actionGroup ref="AddCategoryImageActionGroup" stepKey="addCategoryImageAgain">
40+
<argument name="image" value="ImageUploadPngTwo"/>
41+
</actionGroup>
42+
<actionGroup ref="CheckCategoryImageInAdminActionGroup" stepKey="checkCategoryImageInAdminAgain"/>
43+
</test>
44+
</tests>

app/code/Magento/MediaGalleryUi/Test/Mftf/Data/AdminEnhancedMediaGalleryImageData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@
4040
<data key="extension">jpg</data>
4141
<data key="keywords">magento, mediagallerymetadata</data>
4242
</entity>
43+
<entity name="ImageUploadPngTwo" type="image">
44+
<data key="file">magento-logo_2.png</data>
45+
<data key="extension">png</data>
46+
</entity>
4347
</entities>
Loading

0 commit comments

Comments
 (0)