Skip to content

Commit 8d676bc

Browse files
committed
MC-39759: Navigation arrow buttons not visible after video starts on product image
1 parent 73dc538 commit 8d676bc

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed

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: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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>

lib/web/mage/gallery/gallery.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@
964964
height: @fotorama_close_button;
965965
opacity: 0;
966966
right: 0;
967-
top: 0;
967+
top: 10%;
968968
transform: translate3d((@fotorama_close_button), (-@fotorama_close_button), 0);
969969
transition: opacity 0.3s ease-in-out;
970970
width: @fotorama_close_button;

0 commit comments

Comments
 (0)