Skip to content

Commit 08bfb75

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

8 files changed

+155
-17
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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 that close button is hidden on Storefront Product page -->
12+
<actionGroup name="AssertCloseButtonHiddenProductVideoActionGroup">
13+
<annotations>
14+
<description>Validates that the close button is absent on the Storefront Product page.</description>
15+
</annotations>
16+
17+
<dontSeeElement selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="dontSeeCloseVideo"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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 that next button is hidden on Storefront Product page -->
12+
<actionGroup name="AssertNextButtonHiddenProductVideoActionGroup">
13+
<annotations>
14+
<description>Validates that the next button is absent on the Storefront Product page.</description>
15+
</annotations>
16+
17+
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOverImage"/>
18+
<dontSeeElement selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="dontSeeNextButton"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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 that previous button is hidden on Storefront Product page -->
12+
<actionGroup name="AssertPrevButtonHiddenProductVideoActionGroup">
13+
<annotations>
14+
<description>Validates that the previous button is absent on the Storefront Product page.</description>
15+
</annotations>
16+
17+
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOverImage"/>
18+
<dontSeeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="dontSeePrevButton"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<!-- Click close button in product video on Storefront Product page -->
12+
<actionGroup name="ClickCloseButtonProductVideoActionGroup">
13+
<annotations>
14+
<description>Click close button in product video on the Storefront Product page.</description>
15+
</annotations>
16+
17+
<seeElement selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="seeCloseVideo"/>
18+
<click stepKey="clickCloseVideo" selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}"/>
19+
<wait stepKey="waitTwoSecondsToCloseVideo" time="2"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<!-- Click next button in product video on Storefront Product page -->
12+
<actionGroup name="ClickNextButtonProductVideoActionGroup">
13+
<annotations>
14+
<description>Click next button in product video on the Storefront Product page.</description>
15+
</annotations>
16+
17+
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOverImage"/>
18+
<seeElement selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="seeNextButton"/>
19+
<click selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="clickNextButton"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<!-- Click play button in product video on Storefront Product page -->
12+
<actionGroup name="ClickPlayButtonProductVideoActionGroup">
13+
<annotations>
14+
<description>Click play button in product video on the Storefront Product page.</description>
15+
</annotations>
16+
17+
<click selector="{{StorefrontProductInfoMainSection.clickPlayVideo}}" stepKey="clickToPlayVideo"/>
18+
<wait stepKey="waitFiveSecondsToPlayVideo" time="5"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<!-- Click previous button in product video on Storefront Product page -->
12+
<actionGroup name="ClickPrevButtonProductVideoActionGroup">
13+
<annotations>
14+
<description>Click previous button in product video on the Storefront Product page.</description>
15+
</annotations>
16+
17+
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOverImage"/>
18+
<seeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="seePrevButton"/>
19+
<click selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="clickPrevButton"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/ProductVideo/Test/Mftf/Test/VimeoVideoControlButtonsOnProductPageTest.xml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
</after>
3131

3232
<!-- Open product edit page -->
33-
<amOnPage url="{{AdminProductEditPage.url($createProduct.id$)}}" stepKey="goToProductEditPage"/>
33+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
34+
<argument name="productId" value="$createProduct.id$"/>
35+
</actionGroup>
3436
<!-- Add image to product -->
3537
<actionGroup ref="AddProductImageActionGroup" stepKey="addImageForProduct">
3638
<argument name="image" value="MagentoLogo"/>
@@ -47,33 +49,27 @@
4749
<argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/>
4850
</actionGroup>
4951

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"/>
52+
<!-- Click next button -->
53+
<actionGroup ref="AssertPrevButtonHiddenProductVideoActionGroup" stepKey="assertPrevButtonIsHidden"/>
54+
<actionGroup ref="ClickNextButtonProductVideoActionGroup" stepKey="clickNextNavigationButton"/>
5455

5556
<!-- Assert product video present in the storefront product page -->
5657
<actionGroup ref="AssertProductVideoStorefrontProductPageActionGroup" stepKey="assertProductVideoPresentInStorefrontProductPage">
5758
<argument name="videoType" value="vimeo"/>
5859
</actionGroup>
59-
<dontSeeElement selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="dontSeeCloseVideo"/>
60+
<actionGroup ref="AssertCloseButtonHiddenProductVideoActionGroup" stepKey="assertCloseVideoButtonIsHidden"/>
6061

6162
<!-- Click Play video button -->
62-
<click stepKey="clickToPlayVideo" selector="{{StorefrontProductInfoMainSection.clickPlayVideo}}"/>
63-
<wait stepKey="waitFiveSecondsToPlayVideo" time="5"/>
63+
<actionGroup ref="ClickPlayButtonProductVideoActionGroup" stepKey="clickPlayVideoButton"/>
6464

6565
<!-- Assert product navigation arrows -->
66-
<dontSeeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="dontSeePrevButton2"/>
67-
<dontSeeElement selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="dontSeeNextButton"/>
66+
<actionGroup ref="AssertPrevButtonHiddenProductVideoActionGroup" stepKey="assertPrevButtonIsHidden2"/>
67+
<actionGroup ref="AssertNextButtonHiddenProductVideoActionGroup" stepKey="assertNextButtonIsHidden"/>
6868

6969
<!-- Click Close video button -->
70-
<seeElement selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="seeCloseVideo"/>
71-
<click stepKey="clickCloseVideo" selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}"/>
72-
<wait stepKey="waitTwoSecondsToCloseVideo" time="2"/>
70+
<actionGroup ref="ClickCloseButtonProductVideoActionGroup" stepKey="clickCloseVideoButton"/>
7371

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"/>
72+
<!-- Click previous button -->
73+
<actionGroup ref="ClickPrevButtonProductVideoActionGroup" stepKey="clickPrevNavigationButton"/>
7874
</test>
7975
</tests>

0 commit comments

Comments
 (0)