|
| 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="StorefrontProductImageWithDotTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Product Image"/> |
| 15 | + <title value="Product image with dot in filename should be visible on frontend after catalog image cache flush"/> |
| 16 | + <description value="Product image with dot in filename should be visible on frontend after catalog image cache flush"/> |
| 17 | + <group value="Catalog"/> |
| 18 | + <severity value="AVERAGE"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <magentoCLI command="config:set system/upload_configuration/enable_resize 0" stepKey="disableImageResizing"/> |
| 22 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 23 | + </before> |
| 24 | + <after> |
| 25 | + <magentoCLI command="config:set system/upload_configuration/enable_resize 1" stepKey="enableImageResizing"/> |
| 26 | + <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteProduct"> |
| 27 | + <argument name="sku" value="{{SimpleProduct.sku}}"/> |
| 28 | + </actionGroup> |
| 29 | + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> |
| 30 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> |
| 31 | + </after> |
| 32 | + |
| 33 | + <!--Create product--> |
| 34 | + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="openNewProductPage"/> |
| 35 | + <actionGroup ref="FillMainProductFormActionGroup" stepKey="fillSimpleProductMain"> |
| 36 | + <argument name="product" value="SimpleProduct"/> |
| 37 | + </actionGroup> |
| 38 | + |
| 39 | + <!-- Add image to product --> |
| 40 | + <actionGroup ref="AddProductImageActionGroup" stepKey="addImageForSimpleProduct"> |
| 41 | + <argument name="image" value="TestImageWithDotInFilename"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct"/> |
| 44 | + |
| 45 | + <!-- Flush catalog image cache --> |
| 46 | + <actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPage"/> |
| 47 | + <actionGroup ref="AdminClickFlushCatalogImagesCacheActionGroup" stepKey="clearCatalogImageCache"/> |
| 48 | + |
| 49 | + <!-- Assert product in storefront product page --> |
| 50 | + <actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageActionGroup" stepKey="assertProductInStorefrontProductPage"> |
| 51 | + <argument name="product" value="SimpleProduct"/> |
| 52 | + </actionGroup> |
| 53 | + |
| 54 | + <!-- Assert product image in storefront product page --> |
| 55 | + <grabAttributeFrom userInput="src" selector="{{StorefrontProductMediaSection.imageFile(TestImageWithDotInFilename.filename)}}" stepKey="productImageURL"/> |
| 56 | + <helper class="Magento\Backend\Test\Mftf\Helper\CurlHelpers" method="assertImageContentIsEqual" stepKey="assertProductImageEqualToOriginalImage"> |
| 57 | + <argument name="url">{$productImageURL}</argument> |
| 58 | + <argument name="expectedString">{{TestImageWithDotInFilenameImageContent.baseImage_md5}}</argument> |
| 59 | + <argument name="message">Url: "{$productImageURL}" did not render image: {{TestImageWithDotInFilename.file}}</argument> |
| 60 | + </helper> |
| 61 | + </test> |
| 62 | +</tests> |
0 commit comments