|
| 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="YoutubeVideoWindowOnProductPageTest"> |
| 12 | + <annotations> |
| 13 | + <features value="ProductVideo"/> |
| 14 | + <stories value="MAGETWO-91707: [Sigma Beauty]Cannot pause Youtube video in IE 11"/> |
| 15 | + <testCaseId value="MAGETWO-95254"/> |
| 16 | + <title value="Youtube video window on the product page"/> |
| 17 | + <description value="Check Youtube video window on the product page"/> |
| 18 | + <severity value="MAJOR"/> |
| 19 | + <group value="ProductVideo"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <before> |
| 23 | + <!--Log In--> |
| 24 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 25 | + <!--Create category--> |
| 26 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 27 | + <!--Create product--> |
| 28 | + <createData entity="SimpleProduct" stepKey="createProduct"> |
| 29 | + <requiredEntity createDataKey="createCategory"/> |
| 30 | + </createData> |
| 31 | + <!-- Set product video Youtube api key configuration --> |
| 32 | + <createData entity="ProductVideoYoutubeApiKeyConfig" stepKey="setStoreConfig" after="loginAsAdmin"/> |
| 33 | + </before> |
| 34 | + |
| 35 | + <!--Open simple product--> |
| 36 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductIndex"/> |
| 37 | + <waitForPageLoad stepKey="wait1"/> |
| 38 | + <actionGroup ref="resetProductGridToDefaultView" stepKey="resetProductGrid"/> |
| 39 | + <actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku"> |
| 40 | + <argument name="product" value="$$createProduct$$"/> |
| 41 | + </actionGroup> |
| 42 | + <actionGroup ref="openProducForEditByClickingRowXColumnYInProductGrid" stepKey="openFirstProductForEdit"/> |
| 43 | + |
| 44 | + <!-- Add product video --> |
| 45 | + <actionGroup ref="addProductVideo" stepKey="addProductVideo" after="openFirstProductForEdit"/> |
| 46 | + <!-- Assert product video in admin product form --> |
| 47 | + <actionGroup ref="assertProductVideoAdminProductPage" stepKey="assertProductVideoAdminProductPage" after="addProductVideo"/> |
| 48 | + |
| 49 | + <!-- Save the product --> |
| 50 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveFirstProduct"/> |
| 51 | + <waitForPageLoad stepKey="waitForFirstProductSaved"/> |
| 52 | + |
| 53 | + <!-- Assert product video in storefront product page --> |
| 54 | + <amOnPage url="$$createProduct.name$$.html" stepKey="goToStorefrontCategoryPage"/> |
| 55 | + <waitForPageLoad stepKey="waitForStorefrontPageLoaded"/> |
| 56 | + <actionGroup ref="assertProductVideoStorefrontProductPage" stepKey="assertProductVideoStorefrontProductPage" after="waitForStorefrontPageLoaded"/> |
| 57 | + |
| 58 | + <!--Click Play video button--> |
| 59 | + <click stepKey="clickToPlayVideo" selector="{{StorefrontProductInfoMainSection.clickInVideo}}"/> |
| 60 | + <wait stepKey="waitFiveSecondToPlayVideo" time="5"/> |
| 61 | + <switchToIFrame selector="{{StorefrontProductInfoMainSection.frameVideo}}" stepKey="switchToFrame"/> |
| 62 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.videoPlayedMode}}" stepKey="waitForVideoPlayed"/> |
| 63 | + <seeElement selector="{{StorefrontProductInfoMainSection.videoPlayedMode}}" stepKey="AssertVideoIsPlayed"/> |
| 64 | + <switchToIFrame stepKey="switchBack1"/> |
| 65 | + |
| 66 | + <!--Click Pause button--> |
| 67 | + <click stepKey="clickToStopVideo" selector="{{StorefrontProductInfoMainSection.clickInVideo}}"/> |
| 68 | + <wait stepKey="waitFiveSecondToStopVideo" time="5"/> |
| 69 | + <switchToIFrame selector="{{StorefrontProductInfoMainSection.frameVideo}}" stepKey="switchToFrame2"/> |
| 70 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.videoPausedMode}}" stepKey="waitForVideoPaused"/> |
| 71 | + <seeElement selector="{{StorefrontProductInfoMainSection.videoPausedMode}}" stepKey="AssertVideoIsPaused"/> |
| 72 | + <switchToIFrame stepKey="switchBack2"/> |
| 73 | + |
| 74 | + <!--Click Play video button again. Make sure that Video continued playing--> |
| 75 | + <click stepKey="clickAgainToPlayVideo" selector="{{StorefrontProductInfoMainSection.clickInVideo}}"/> |
| 76 | + <wait stepKey="waitAgainFiveSecondToPlayVideo" time="5"/> |
| 77 | + <switchToIFrame selector="{{StorefrontProductInfoMainSection.frameVideo}}" stepKey="switchToFrame3"/> |
| 78 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.videoPlayedMode}}" stepKey="waitForVideoPlayedAgain"/> |
| 79 | + <seeElement selector="{{StorefrontProductInfoMainSection.videoPlayedMode}}" stepKey="AssertVideoIsPlayedAgain"/> |
| 80 | + <switchToIFrame stepKey="switchBack3"/> |
| 81 | + |
| 82 | + <after> |
| 83 | + <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> |
| 84 | + <deleteData createDataKey="createCategory" stepKey="deleteCategoryFirst"/> |
| 85 | + <!-- Set product video configuration to default --> |
| 86 | + <createData entity="DefaultProductVideoConfig" stepKey="setStoreDefaultConfig" before="logout"/> |
| 87 | + <!--Log Out--> |
| 88 | + <actionGroup ref="logout" stepKey="logout"/> |
| 89 | + </after> |
| 90 | + </test> |
| 91 | +</tests> |
| 92 | + |
0 commit comments