Skip to content

Commit 74fa143

Browse files
author
Serhii Balko
committed
Merge remote-tracking branch 'origin/MC-39759' into 2.4-develop-pr50
2 parents 49d4a2f + 1b21872 commit 74fa143

File tree

4 files changed

+103
-0
lines changed

4 files changed

+103
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<!-- Assert the navigation arrows on Storefront Product page -->
12+
<actionGroup name="AssertProductVideoNavigationArrowsActionGroup">
13+
<annotations>
14+
<description>Validates the navigation arrows on the Storefront Product page.</description>
15+
</annotations>
16+
<arguments>
17+
<argument name="videoType" type="string" defaultValue="vimeo"/>
18+
</arguments>
19+
20+
<dontSeeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="dontSeePrevButton"/>
21+
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOverImage"/>
22+
<seeElement selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="seeNextButton"/>
23+
<click selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="clickNextButton"/>
24+
<seeElement selector="{{StorefrontProductInfoMainSection.productVideo(videoType)}}" stepKey="seeProductVideoDataType"/>
25+
26+
<dontSeeElement selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="dontSeeCloseVideo"/>
27+
28+
<click selector="{{StorefrontProductInfoMainSection.clickPlayVideo}}" stepKey="clickToPlayVideo"/>
29+
<wait stepKey="waitFiveSecondsToPlayVideo" time="5"/>
30+
31+
<dontSeeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="dontSeePrevButtonSecond"/>
32+
<dontSeeElement selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="dontSeeNextButton"/>
33+
34+
<seeElement selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="seeCloseVideo"/>
35+
<click selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="clickToCloseVideo"/>
36+
<wait stepKey="waitTwoSecondsToCloseVideo" time="2"/>
37+
38+
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOverImageSecond"/>
39+
<seeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="seePrevButton"/>
40+
<click selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="clickPrevButton"/>
41+
</actionGroup>
42+
</actionGroups>

app/code/Magento/ProductVideo/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@
1414
<element name="videoPausedMode" type="button" selector="//*[contains(@class, 'paused-mode')]"/>
1515
<element name="videoPlayedMode" type="button" selector="//*[contains(@class,'playing-mode')]"/>
1616
<element name="frameVideo" type="button" selector="widget2"/>
17+
<element name="clickPlayVideo" type="block" selector="//*[contains(@class,'fotorama__stage__shaft')]"/>
18+
<element name="clickCloseVideo" type="block" selector="//*[@class='fotorama__video-close fotorama-show-control']"/>
1719
</section>
1820
</sections>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
<useCaseId value="MC-39759"/>
20+
<group value="productVideo"/>
21+
</annotations>
22+
<before>
23+
<createData entity="SimpleProduct2" stepKey="createProduct"/>
24+
<!-- Login to Admin page -->
25+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
26+
</before>
27+
<after>
28+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
29+
<!-- Logout from Admin page -->
30+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
31+
</after>
32+
33+
<!-- Open product edit page -->
34+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
35+
<argument name="productId" value="$createProduct.id$"/>
36+
</actionGroup>
37+
<!-- Add image to product -->
38+
<actionGroup ref="AddProductImageActionGroup" stepKey="addImageForProduct">
39+
<argument name="image" value="MagentoLogo"/>
40+
</actionGroup>
41+
<!-- Add product video -->
42+
<actionGroup ref="AddProductVideoActionGroup" stepKey="addProductVideo">
43+
<argument name="video" value="VimeoProductVideo"/>
44+
</actionGroup>
45+
<!-- Save product form -->
46+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/>
47+
48+
<!-- Open storefront product page -->
49+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToStorefrontProductPage">
50+
<argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/>
51+
</actionGroup>
52+
53+
<!-- Check the navigation arrows on Storefront Product page -->
54+
<actionGroup ref="AssertProductVideoNavigationArrowsActionGroup" stepKey="assertProductVideoNavigationArrowsOnStorefrontProductPage">
55+
<argument name="videoType" value="vimeo"/>
56+
</actionGroup>
57+
</test>
58+
</tests>

app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ define([
714714
}
715715

716716
$('.' + this.FTAR).addClass(this.isFullscreen ? 'fotorama__arr--shown' : 'fotorama__arr--hidden');
717+
$('.' + this.FTVC).addClass('fotorama-show-control');
717718
}
718719
},
719720

0 commit comments

Comments
 (0)