|
| 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="VimeoVideoControlButtonsOnProductPageTest"> |
| 12 | + <annotations> |
| 13 | + <features value="ProductVideo"/> |
| 14 | + <stories value="Navigation arrow buttons not visible after video starts on product image"/> |
| 15 | + <title value="Navigation arrow buttons not visible after video starts on product image"/> |
| 16 | + <description value="Navigation arrow buttons not visible after video starts on product image"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-40398"/> |
| 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 | + |
| 32 | + <!-- Open product edit page --> |
| 33 | + <amOnPage url="{{AdminProductEditPage.url($createProduct.id$)}}" stepKey="goToProductEditPage"/> |
| 34 | + <!-- Add image to product --> |
| 35 | + <actionGroup ref="AddProductImageActionGroup" stepKey="addImageForProduct"> |
| 36 | + <argument name="image" value="MagentoLogo"/> |
| 37 | + </actionGroup> |
| 38 | + <!-- Add product video --> |
| 39 | + <actionGroup ref="AddProductVideoActionGroup" stepKey="addProductVideo"> |
| 40 | + <argument name="video" value="VimeoProductVideo"/> |
| 41 | + </actionGroup> |
| 42 | + <!-- Save product form --> |
| 43 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> |
| 44 | + |
| 45 | + <!-- Open storefront product page --> |
| 46 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToStorefrontProductPage"> |
| 47 | + <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> |
| 48 | + </actionGroup> |
| 49 | + |
| 50 | + <!-- Assert product navigation arrows --> |
| 51 | + <dontSeeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="dontSeePrevButton"/> |
| 52 | + <seeElement selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="seeNextButton"/> |
| 53 | + <click selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="clickNextButton"/> |
| 54 | + |
| 55 | + <!-- Assert product video present in the storefront product page --> |
| 56 | + <actionGroup ref="AssertProductVideoStorefrontProductPageActionGroup" stepKey="assertProductVideoPresentInStorefrontProductPage"> |
| 57 | + <argument name="videoType" value="vimeo"/> |
| 58 | + </actionGroup> |
| 59 | + <dontSeeElement selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="dontSeeCloseVideo"/> |
| 60 | + |
| 61 | + <!-- Click Play video button --> |
| 62 | + <click stepKey="clickToPlayVideo" selector="{{StorefrontProductInfoMainSection.clickPlayVideo}}"/> |
| 63 | + <wait stepKey="waitFiveSecondsToPlayVideo" time="5"/> |
| 64 | + |
| 65 | + <!-- Assert product navigation arrows --> |
| 66 | + <dontSeeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="dontSeePrevButton2"/> |
| 67 | + <dontSeeElement selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="dontSeeNextButton"/> |
| 68 | + |
| 69 | + <!-- Click Close video button --> |
| 70 | + <seeElement selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="seeCloseVideo"/> |
| 71 | + <click stepKey="clickCloseVideo" selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}"/> |
| 72 | + <wait stepKey="waitTwoSecondsToCloseVideo" time="2"/> |
| 73 | + |
| 74 | + <!-- Assert product navigation arrows --> |
| 75 | + <moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOverImage"/> |
| 76 | + <seeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="seePrevButton"/> |
| 77 | + <click selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="clickPrevButton"/> |
| 78 | + </test> |
| 79 | +</tests> |
0 commit comments