Skip to content

Commit ec6a5e0

Browse files
committed
ACP2E-1632: GIF Images issue on product page
1 parent 1e23d01 commit ec6a5e0

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/ImageData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343
<data key="filename">jpg</data>
4444
<data key="file_extension">jpg</data>
4545
</entity>
46+
<entity name="GifImageWithUnusedTransparencyIndex" type="image">
47+
<data key="title" unique="suffix">GifImageWithUnusedTransparencyIndex</data>
48+
<data key="file">transparency_index.gif</data>
49+
<data key="filename">transparency_index</data>
50+
<data key="file_extension">gif</data>
51+
</entity>
4652
<entity name="LargeImage" type="image">
4753
<data key="title" unique="suffix">largeimage</data>
4854
<data key="file">large.jpg</data>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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="AdminSimpleProductGifWithUnusedTransparencyImageTest">
11+
<annotations>
12+
<features value="Catalog"/>
13+
<title value="Using a GIF image with transparency color declared but not used as a product image"/>
14+
<description value="Using a GIF image with transparency color declared but not used as a product main image should not prevent the product grid from being rendered properly"/>
15+
<severity value="CRITICAL"/>
16+
<useCaseId value="ACP2E-1632"/>
17+
<testCaseId value="AC-8028"/>
18+
<group value="Catalog"/>
19+
</annotations>
20+
21+
<before>
22+
<createData entity="_defaultCategory" stepKey="category"/>
23+
<createData entity="_defaultProduct" stepKey="firstProduct">
24+
<requiredEntity createDataKey="category"/>
25+
</createData>
26+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
27+
</before>
28+
29+
<after>
30+
<deleteData createDataKey="category" stepKey="deletePreReqCategory"/>
31+
<deleteData createDataKey="firstProduct" stepKey="deleteFirstProduct"/>
32+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
33+
</after>
34+
35+
<!-- Navigate to the product grid and edit the product -->
36+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goToProductIndex"/>
37+
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProductGridBySku">
38+
<argument name="product" value="$$firstProduct$$"/>
39+
</actionGroup>
40+
<actionGroup ref="OpenProductForEditByClickingRowXColumnYInProductGridActionGroup" stepKey="openProducForEditByClickingRow1Column2InProductGrid"/>
41+
42+
<!-- Set the test GIF image as a main product image and save the product -->
43+
<actionGroup ref="AddProductImageActionGroup" stepKey="addImageForProduct">
44+
<argument name="image" value="GifImageWithUnusedTransparencyIndex"/>
45+
</actionGroup>
46+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveProduct"/>
47+
48+
<!-- Go back to the product grid and make sure the product is present and visible on the grid -->
49+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="returnToProductIndex"/>
50+
<actionGroup ref="AssertProductOnAdminGridActionGroup" stepKey="assertFirstOnAdminGrid">
51+
<argument name="product" value="_defaultProduct"/>
52+
</actionGroup>
53+
54+
<actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="resetProductGridBeforeLeaving"/>
55+
</test>
56+
</tests>

0 commit comments

Comments
 (0)