|
| 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="StorefrontProductVideoAutoplayOnGalleryFullscreenModeTest"> |
| 12 | + <annotations> |
| 13 | + <features value="ProductVideo"/> |
| 14 | + <stories value="Storefront product video autoplay on gallery full screen mode"/> |
| 15 | + <title value="Storefront product video gets auto played on gallery full screen mode"/> |
| 16 | + <description value="Storefront product video autoplay on selecting the video by clicking video thumbnail in |
| 17 | + gallery full screen mode"/> |
| 18 | + <severity value="MAJOR"/> |
| 19 | + <group value="productVideo"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 23 | + <!-- Login to Admin page --> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 28 | + <!-- Logout from Admin page --> |
| 29 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 30 | + </after> |
| 31 | + <!-- Open product edit page --> |
| 32 | + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage"> |
| 33 | + <argument name="productId" value="$createProduct.id$"/> |
| 34 | + </actionGroup> |
| 35 | + <!-- Add image to product --> |
| 36 | + <actionGroup ref="AddProductImageActionGroup" stepKey="addImageForProduct"> |
| 37 | + <argument name="image" value="MagentoLogo"/> |
| 38 | + </actionGroup> |
| 39 | + <!-- Add product video --> |
| 40 | + <actionGroup ref="AddProductVideoActionGroup" stepKey="addProductVideo"> |
| 41 | + <argument name="video" value="VimeoProductVideo"/> |
| 42 | + </actionGroup> |
| 43 | + <!-- Save product form --> |
| 44 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> |
| 45 | + <!-- Open storefront product page --> |
| 46 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToStorefrontProductPage"> |
| 47 | + <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> |
| 48 | + </actionGroup> |
| 49 | + <actionGroup ref="StorefrontProductPageOpenImageFullscreenActionGroup" stepKey="openGalleryFullScreen"> |
| 50 | + <argument name="imageNumber" value="1"/> |
| 51 | + </actionGroup> |
| 52 | + <conditionalClick selector="{{StorefrontProductMediaSection.fotoramaImageThumbnail('2')}}" |
| 53 | + dependentSelector="{{StorefrontProductMediaSection.fotoramaImageThumbnailActive('2')}}" |
| 54 | + visible="false" stepKey="clickOnVideoThumbnail"/> |
| 55 | + <wait stepKey="waitTenSecondsToPlayVideo" time="10"/> |
| 56 | + <!-- On clicking video thumbnail, assert the video iframe is loaded with autoplay attribute --> |
| 57 | + <seeElementInDOM selector="iframe" stepKey="AssertVideoIsPlayed"/> |
| 58 | + <grabAttributeFrom selector="iframe" userInput="allow" stepKey="grabAllowAttribute"/> |
| 59 | + <assertStringContainsString stepKey="assertAllowAttribute"> |
| 60 | + <actualResult type="string">$grabAllowAttribute</actualResult> |
| 61 | + <expectedResult type="string">autoplay</expectedResult> |
| 62 | + </assertStringContainsString> |
| 63 | + <actionGroup ref="StorefrontProductPageCloseFullscreenGalleryActionGroup" stepKey="closeGalleryFullScreen"/> |
| 64 | + </test> |
| 65 | +</tests> |
0 commit comments