Skip to content

Commit 275ca3e

Browse files
authored
Merge branch '2.4-develop' into cache-clean-remove
2 parents 23ddcfc + 297728f commit 275ca3e

22 files changed

+1335
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertStorefrontProductPageGalleryChangingFullscreenImageByRibbonActionGroup">
11+
<annotations>
12+
<description>On the product page change main image by clicking on the images in the ribbon. Fullscreen</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="startImage" type="string" />
16+
<argument name="expectedImage" type="string" />
17+
</arguments>
18+
<waitForElementVisible selector="{{StorefrontProductMediaSection.productImageFullscreen(startImage)}}" stepKey="seeStartFullscreenImage"/>
19+
<seeElement selector="{{StorefrontProductMediaSection.imgSelectedInThumbnail(startImage)}}" stepKey="seeActiveImageInThumbnail"/>
20+
<click selector="{{StorefrontProductMediaSection.productImageInFotorama(expectedImage)}}" stepKey="clickOnExpectedImage"/>
21+
<seeElement selector="{{StorefrontProductMediaSection.productImageFullscreen(expectedImage)}}" stepKey="seeExpectedImageAfterClick"/>
22+
<seeElement selector="{{StorefrontProductMediaSection.imgSelectedInThumbnail(expectedImage)}}" stepKey="seeExpectedImageActiveInThumbnailAfterChange"/>
23+
<click selector="{{StorefrontProductMediaSection.productImageInFotorama(startImage)}}" stepKey="clickOnStartImageInRibbon"/>
24+
<seeElement selector="{{StorefrontProductMediaSection.productImageFullscreen(startImage)}}" stepKey="seeStartImageAfterSecondChange"/>
25+
<seeElement selector="{{StorefrontProductMediaSection.imgSelectedInThumbnail(startImage)}}" stepKey="seeStartImageActiveInThumbnailAfterSecondChange"/>
26+
</actionGroup>
27+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertStorefrontProductPageGalleryChangingMainImageByRibbonActionGroup">
11+
<annotations>
12+
<description>Changing main image on product page media gallery by clicking on the images in the fotorama ribbon</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="startImage" type="string" />
16+
<argument name="expectedImage" type="string" />
17+
</arguments>
18+
<waitForElementVisible selector="{{StorefrontProductMediaSection.productImage(startImage)}}" stepKey="waitActiveImageDefault"/>
19+
<seeElement selector="{{StorefrontProductMediaSection.imgSelectedInThumbnail(startImage)}}" stepKey="seeActiveImageThumbnail"/>
20+
<click selector="{{StorefrontProductMediaSection.productImageInFotorama(expectedImage)}}" stepKey="firstClickOnImageInRibbon"/>
21+
<seeElement selector="{{StorefrontProductMediaSection.imgSelectedInThumbnail(expectedImage)}}" stepKey="seeExpectedImageSelectedInRibbon"/>
22+
<seeElement selector="{{StorefrontProductMediaSection.productImage(expectedImage)}}" stepKey="seeChangedImageAfterFirstClick"/>
23+
<click selector="{{StorefrontProductMediaSection.productImageInFotorama(startImage)}}" stepKey="secondClickOnImageInRibbon"/>
24+
<seeElement selector="{{StorefrontProductMediaSection.imgSelectedInThumbnail(startImage)}}" stepKey="seeStartImageSelectedInRibbonAfterSecondClick"/>
25+
<seeElement selector="{{StorefrontProductMediaSection.productImage(startImage)}}" stepKey="seeChangedImageAfterSecondClick"/>
26+
</actionGroup>
27+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
<actionGroup name="AssertStorefrontProductPageGalleryFullscreenThumbnailDragActionGroup">
12+
<annotations>
13+
<description>On the product page check functional of drag actions in the fotorama ribbon during fullscreen</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="dragPointImage" type="string" />
17+
<argument name="currentImage" type="string"/>
18+
<argument name="firstImage" type="string" />
19+
</arguments>
20+
<waitForElementVisible selector="{{StorefrontProductMediaSection.productImageFullscreen(currentImage)}}" stepKey="seeFullscreenImage"/>
21+
<seeElement selector="{{StorefrontProductMediaSection.productImageInFotorama(firstImage)}}" stepKey="seeFirstImageInRibbon"/>
22+
<dragAndDrop selector1="{{StorefrontProductMediaSection.productImageInFotorama(dragPointImage)}}" selector2="{{StorefrontProductMediaSection.productImageInFotorama(dragPointImage)}}" x="-300" y="0" stepKey="dragRibbon"/>
23+
<seeElement selector="{{StorefrontProductMediaSection.productImageFullscreen(currentImage)}}" stepKey="seeFullscreenImageAfterDrag"/>
24+
<dontSeeElement selector="{{StorefrontProductMediaSection.productImageInFotorama(firstImage)}}" stepKey="dontSeeFirstImageInRibbonAfterDrag"/>
25+
<dragAndDrop selector1="{{StorefrontProductMediaSection.productImageInFotorama(dragPointImage)}}" selector2="{{StorefrontProductMediaSection.productImageInFotorama(dragPointImage)}}" x="300" y="0" stepKey="dragBackRibbon"/>
26+
<seeElement selector="{{StorefrontProductMediaSection.productImageFullscreen(currentImage)}}" stepKey="seeMainImageAfterBackDrag"/>
27+
<seeElement selector="{{StorefrontProductMediaSection.productImageInFotorama(firstImage)}}" stepKey="seeFirstImageInRibbonAfterBackDrag"/>
28+
</actionGroup>
29+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertStorefrontProductPageGalleryImageDimensionsActionGroup">
11+
<annotations>
12+
<description>On the product page grab dimensions of the displayed product image, and image section. Assert that image is less or equals</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="imageSource" defaultValue="{{StorefrontProductMediaSection.mainImageForJsActions}}" type="string"/>
16+
</arguments>
17+
<executeJS function="var img=document.querySelector('{{imageSource}}');
18+
return img.clientHeight;" stepKey="getImageHeight"/>
19+
<executeJS function="var img=document.querySelector('{{imageSource}}');
20+
return img.clientWidth;" stepKey="getImageWidth"/>
21+
<executeJS function="var img=document.querySelector('{{StorefrontProductMediaSection.imageSectionForJsActions}}');
22+
return img.clientHeight;" stepKey="getSectionHeight"/>
23+
<executeJS function="var img=document.querySelector('{{StorefrontProductMediaSection.imageSectionForJsActions}}');
24+
return img.clientWidth;" stepKey="getSectionWidth"/>
25+
<assertLessThanOrEqual stepKey="checkHeightIsCorrect">
26+
<actualResult type="variable">getImageHeight</actualResult>
27+
<expectedResult type="variable">getSectionHeight</expectedResult>
28+
</assertLessThanOrEqual>
29+
<assertLessThanOrEqual stepKey="checkWidthIsCorrect">
30+
<actualResult type="variable">getImageWidth</actualResult>
31+
<expectedResult type="variable">getSectionWidth</expectedResult>
32+
</assertLessThanOrEqual>
33+
</actionGroup>
34+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertStorefrontProductPageGalleryImagePositionInThumbnailRibbonActionGroup">
11+
<annotations>
12+
<description>Check the expected image position in the fotorama ribbon on the product page</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="image" defaultValue="Magento2.filename" type="string"/>
16+
<argument name="extension" defaultValue="Magento2.file_extension" type="string"/>
17+
<argument name="position" defaultValue="0" type="string" />
18+
</arguments>
19+
<grabAttributeFrom userInput="src" selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber(position)}}" stepKey="grabSrcFromThumbnailImageByPosition"/>
20+
<assertRegExp stepKey="checkImagePositionInThumbnail">
21+
<actualResult type="variable">$grabSrcFromThumbnailImageByPosition</actualResult>
22+
<expectedResult type="string">|{{image}}[_\d]*.{{extension}}|</expectedResult>
23+
</assertRegExp>
24+
</actionGroup>
25+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertStorefrontProductPageGalleryMainImageButtonsActionGroup">
11+
<annotations>
12+
<description>Assert the buttons functionality "change image" on the product media gallery on the product page</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="startImage" type="string" />
16+
<argument name="expectedImage" type="string" />
17+
</arguments>
18+
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOverImage"/>
19+
<waitForElementVisible selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="waitForButtons"/>
20+
<seeElement selector="{{StorefrontProductMediaSection.productImage(startImage)}}" stepKey="seeProductImageBeforeActions"/>
21+
<click selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="clickOnNextImageButton"/>
22+
<seeElement selector="{{StorefrontProductMediaSection.imgSelectedInThumbnail(expectedImage)}}" stepKey="seeExpectedImageSelectedInRibbon"/>
23+
<seeElement selector="{{StorefrontProductMediaSection.productImage(expectedImage)}}" stepKey="seeExpectedImageOnPreview"/>
24+
<click selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="clickOnPrevImageButton"/>
25+
<seeElement selector="{{StorefrontProductMediaSection.imgSelectedInThumbnail(startImage)}}" stepKey="seeActiveImageSelectedInRibbonAfterSecondChange"/>
26+
<seeElement selector="{{StorefrontProductMediaSection.productImage(startImage)}}" stepKey="seeMainProductImageAfterSecondChange"/>
27+
</actionGroup>
28+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
<actionGroup name="AssertStorefrontProductPageGalleryThumbnailDragActionGroup">
12+
<annotations>
13+
<description>Check functional of drag actions in the thumbnail ribbon on the product page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="dragPointImage" type="string" />
17+
<argument name="currentImage" type="string"/>
18+
<argument name="firstImage" type="string" />
19+
</arguments>
20+
<waitForElementVisible selector="{{StorefrontProductMediaSection.productImage(currentImage)}}" stepKey="seeMainImageBeforeDragActions"/>
21+
<dontSeeElement selector="{{StorefrontProductMediaSection.fotoramaPrevButton}}" stepKey="dontSeePrevButtonBeforeDragActions"/>
22+
<dragAndDrop selector1="{{StorefrontProductMediaSection.productImageInFotorama(dragPointImage)}}" selector2="{{StorefrontProductMediaSection.productImageInFotorama(dragPointImage)}}" x="-300" y="0" stepKey="dragRibbonForward"/>
23+
<seeElement selector="{{StorefrontProductMediaSection.productImage(currentImage)}}" stepKey="seeMainImageDontChangeAfterDrag"/>
24+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaPrevButton}}" stepKey="waitPrevButton"/>
25+
<seeElement selector="{{StorefrontProductMediaSection.fotoramaPrevButton}}" stepKey="seePrevButton"/>
26+
<dontSeeElement selector="{{StorefrontProductMediaSection.productImageInFotorama(firstImage)}}" stepKey="dontSeeFirstImageInRibbonAfterDrag"/>
27+
<dragAndDrop selector1="{{StorefrontProductMediaSection.productImageInFotorama(dragPointImage)}}" selector2="{{StorefrontProductMediaSection.productImageInFotorama(dragPointImage)}}" x="300" y="0" stepKey="dragBackRibbon"/>
28+
<seeElement selector="{{StorefrontProductMediaSection.productImage(currentImage)}}" stepKey="seeMainImageDontChangeAfterBackDrag"/>
29+
<seeElement selector="{{StorefrontProductMediaSection.productImageInFotorama(firstImage)}}" stepKey="seeFirstImageInRibbonAfterBackDrag"/>
30+
<dontSeeElement selector="{{StorefrontProductMediaSection.fotoramaPrevButton}}" stepKey="dontSeePrevButtonAfterBackDrag"/>
31+
</actionGroup>
32+
</actionGroups>
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+
<actionGroup name="StorefrontProductPageGalleryDragMainImageBackActionGroup">
12+
<annotations>
13+
<description>Drag back main image in the media gallery of product page</description>
14+
</annotations>
15+
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOnProductImage"/>
16+
<waitForElementVisible selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="waitNextButton"/>
17+
<dragAndDrop selector1="{{StorefrontProductMediaSection.mainImageForJsActions}}" selector2="{{StorefrontProductMediaSection.imageNextButton}}" x="200" y="0" stepKey="dragImageBack"/>
18+
</actionGroup>
19+
</actionGroups>
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+
<actionGroup name="StorefrontProductPageGalleryDragMainImageForwardActionGroup">
12+
<annotations>
13+
<description>Drag forward main image in the media gallery of product page</description>
14+
</annotations>
15+
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOnProductImage"/>
16+
<waitForElementVisible selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="waitNextButton"/>
17+
<dragAndDrop selector1="{{StorefrontProductMediaSection.mainImageForJsActions}}" selector2="{{StorefrontProductMediaSection.imagePrevButton}}" x="-366" y="0" stepKey="dragImage"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ImageData.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,52 @@
2525
<data key="name">adobe-thumb</data>
2626
<data key="extension">jpg</data>
2727
</entity>
28+
<entity name="AdobeSmallImage" type="image">
29+
<data key="title" unique="suffix">magento-small</data>
30+
<data key="file">adobe-small.jpg</data>
31+
<data key="filename">adobe-small</data>
32+
<data key="file_extension">jpg</data>
33+
</entity>
34+
<entity name="AdobeThumbImage" type="image">
35+
<data key="title" unique="suffix">magento-thumb</data>
36+
<data key="file">adobe-thumb.jpg</data>
37+
<data key="filename">adobe-thumb</data>
38+
<data key="file_extension">jpg</data>
39+
</entity>
40+
<entity name="JpgImage" type="image">
41+
<data key="title" unique="suffix">jpgimage</data>
42+
<data key="file">jpg.jpg</data>
43+
<data key="filename">jpg</data>
44+
<data key="file_extension">jpg</data>
45+
</entity>
46+
<entity name="LargeImage" type="image">
47+
<data key="title" unique="suffix">largeimage</data>
48+
<data key="file">large.jpg</data>
49+
<data key="filename">large</data>
50+
<data key="file_extension">jpg</data>
51+
</entity>
52+
<entity name="MagentoImage" type="image">
53+
<data key="title" unique="suffix">magentoimage</data>
54+
<data key="file">magento.jpg</data>
55+
<data key="filename">magento</data>
56+
<data key="file_extension">jpg</data>
57+
</entity>
58+
<entity name="MagentoStage" type="image">
59+
<data key="title" unique="suffix">magentostage</data>
60+
<data key="file">magentoStage.jpg</data>
61+
<data key="filename">magentoStage</data>
62+
<data key="file_extension">jpg</data>
63+
</entity>
64+
<entity name="MediumImage" type="image">
65+
<data key="title" unique="suffix">mediumimage</data>
66+
<data key="file">medium.jpg</data>
67+
<data key="filename">medium</data>
68+
<data key="file_extension">jpg</data>
69+
</entity>
70+
<entity name="PngImage" type="image">
71+
<data key="title" unique="suffix">magentoimage</data>
72+
<data key="file">png.png</data>
73+
<data key="filename">png</data>
74+
<data key="file_extension">png</data>
75+
</entity>
2876
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@
370370
<data key="shareable">Yes</data>
371371
<data key="file">magento-logo.png</data>
372372
<data key="fileName">magento-logo</data>
373+
<data key="file_extension">png</data>
373374
</entity>
374375
<entity name="MagentoLogo" type="image">
375376
<data key="title" unique="suffix">MagentoLogo</data>

0 commit comments

Comments
 (0)