Skip to content

Commit ae9cd76

Browse files
committed
Merge remote-tracking branch 'origin/AC-8441' into Hammer_247_beta1_scope_17042023
2 parents d6d0fd7 + efa3e27 commit ae9cd76

File tree

4 files changed

+63
-4
lines changed

4 files changed

+63
-4
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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="StorefrontProductImageSlideTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Product Image"/>
15+
<title value="Product image should be visible and slide left or right on frontend in mobile"/>
16+
<description value="Product image should be visible and slide left or right on frontend in mobile"/>
17+
<group value="Catalog"/>
18+
<severity value="AVERAGE"/>
19+
<testCaseId value="AC-8441"/>
20+
</annotations>
21+
<before>
22+
<resizeWindow width="800" height="700" stepKey="resizeWindowToMobileView"/>
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
</before>
25+
<after>
26+
<resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/>
27+
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteProduct">
28+
<argument name="sku" value="{{SimpleProduct.sku}}"/>
29+
</actionGroup>
30+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/>
31+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/>
32+
</after>
33+
34+
<!--Create product-->
35+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="openNewProductPage"/>
36+
<actionGroup ref="FillMainProductFormActionGroup" stepKey="fillSimpleProductMain">
37+
<argument name="product" value="SimpleProduct"/>
38+
</actionGroup>
39+
40+
<!-- Add image to product -->
41+
<actionGroup ref="AddProductImageActionGroup" stepKey="addImageForSimpleProduct">
42+
<argument name="image" value="TestImageWithDotInFilename"/>
43+
</actionGroup>
44+
<actionGroup ref="AddProductImageActionGroup" stepKey="addImageForSimpleProduct2">
45+
<argument name="image" value="TestImageWithDotInFilename"/>
46+
</actionGroup>
47+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct"/>
48+
49+
<!-- Assert product in storefront product page -->
50+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageActionGroup" stepKey="assertProductInStorefrontProductPage">
51+
<argument name="product" value="SimpleProduct"/>
52+
</actionGroup>
53+
54+
<click selector="{{StorefrontProductMediaSection.fotoramaImageThumbnail('2')}}" stepKey="clickForFullScreenImage1"/>
55+
<wait stepKey="waitForImageScroll" time="2"/>
56+
<waitForElementVisible selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="waitPrevButton"/>
57+
<seeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="seePrevButton"/>
58+
</test>
59+
</tests>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ define([
558558
}
559559

560560
if (this.isFullscreen && this.fotoramaItem.data('fotorama').activeFrame.i === number) {
561-
this.fotoramaItem.data('fotorama').activeFrame.$stageFrame[0].trigger('click');
561+
this.fotoramaItem.data('fotorama').activeFrame.$stageFrame.trigger('click');
562562
}
563563
},
564564

@@ -700,7 +700,7 @@ define([
700700
if (activeIndexIsBase && number === 1 && $(window).width() > this.MobileMaxWidth) {
701701
setTimeout($.proxy(function () {
702702
fotorama.requestFullScreen();
703-
this.fotoramaItem.data('fotorama').activeFrame.$stageFrame[0].trigger('click');
703+
this.fotoramaItem.data('fotorama').activeFrame.$stageFrame.trigger('click');
704704
this.Base = false;
705705
}, this), 50);
706706
}

lib/web/fotorama/fotorama.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ fotoramaVersion = '4.6.4';
11401140

11411141
function addEvent(el, e, fn, bool) {
11421142
if (!e) return;
1143-
el.addEventListener ? el.addEventListener(e, fn, !!bool) : el.attachEvent('on' + e, fn);
1143+
el.addEventListener ? el.addEventListener(e, fn, {passive: !!bool}) : el.attachEvent('on' + e, fn);
11441144
}
11451145

11461146
/**

lib/web/magnifier/magnify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ define([
505505
if (!$fotoramaStage.hasClass('magnify-wheel-loaded')) {
506506
if (fotoramaStage && fotoramaStage.addEventListener) {
507507
if ('onwheel' in document) {
508-
fotoramaStage.addEventListener('wheel', onWheel, { passive: true });
508+
fotoramaStage.addEventListener('wheel', onWheel, { passive: false });
509509
} else if ('onmousewheel' in document) {
510510
fotoramaStage.addEventListener('mousewheel', onWheel);
511511
} else {

0 commit comments

Comments
 (0)