Skip to content

Commit e2b4e9c

Browse files
Merge branch 'develop' into magento-mpi-MC-31247
2 parents bde1d26 + fe9daa1 commit e2b4e9c

File tree

112 files changed

+7784
-790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+7784
-790
lines changed

app/code/Magento/PageBuilder/Setup/Converters/FixFullWidthRowPadding.php

Lines changed: 0 additions & 58 deletions
This file was deleted.

app/code/Magento/PageBuilder/Setup/Patch/Data/UpgradeFullWidthPadding.php

Lines changed: 0 additions & 60 deletions
This file was deleted.

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/BackgroundConfigurationActionGroup.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,9 @@
328328
<actualResult type="variable">$fallbackImageStyle</actualResult>
329329
</assertContains>
330330
</actionGroup>
331-
<actionGroup name="validateEmptyRowWithInvalidVideoBackgroundAndNoFallbackImage">
331+
<actionGroup name="validateInvalidVideoBackgroundAndNoFallbackImage">
332332
<annotations>
333-
<description>Validates that the Row renders as an empty row when the video in video background fails to load and there is no fallback image.</description>
333+
<description>Validates that nothing renders when the video in video background fails to load and there is no fallback image.</description>
334334
</annotations>
335335
<arguments>
336336
<argument name="section" defaultValue="RowOnStage"/>
@@ -422,6 +422,16 @@
422422
<actualResult type="variable">$videoStyle</actualResult>
423423
</assertNotContains>
424424
</actionGroup>
425+
<actionGroup name="validateVideoBackgroundLoadedButNotPlayingForNotVisibleElement" extends="validateVideoBackgroundPlaying">
426+
<annotations>
427+
<description>Validates that the video in the video background is loaded but not playing for an element that is not visible.</description>
428+
</annotations>
429+
<waitForElement selector="{{section.videoBackgroundVideoElement(index)}}" stepKey="waitForVideoVisible"/>
430+
<assertNotContains stepKey="assertVideoPlaying">
431+
<expectedResult type="string">transform: translate3d(</expectedResult>
432+
<actualResult type="variable">$videoStyle</actualResult>
433+
</assertNotContains>
434+
</actionGroup>
425435
<actionGroup name="validateVideoBackgroundFinishedPlaying" extends="validateVideoBackgroundPlaying">
426436
<annotations>
427437
<description>Validates that the video in the video background is finished playing.</description>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/ContentTypeSliderActionGroup.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,21 @@
2626
<actionGroup name="validateBackgroundAttributesWithNoImageForSlide" extends="validateBackgroundAttributesWithNoImage">
2727
<comment userInput="---merging to remove step---" stepKey="waitForBackgroundAttachment"/>
2828
</actionGroup>
29+
<actionGroup name="validateBackgroundAttributesForSlide" extends="validateBackgroundAttributes">
30+
<remove keyForRemoval="waitForBackgroundAttachment"/>
31+
</actionGroup>
32+
<actionGroup name="inlineEditSlideOrBannerButton">
33+
<arguments>
34+
<argument name="section" defaultValue="SlideOnBackend"/>
35+
<argument name="text" defaultValue="{{PageBuilderSlideItemButtonText_Slide1.value}}" type="string"/>
36+
<argument name="index" defaultValue="1" type="string"/>
37+
<argument name="pageBuilderArea" defaultValue="" type="string"/>
38+
</arguments>
39+
<waitForElementVisible selector="{{section.editableButtonItemElement(index)}}" stepKey="waitForButtonVisible"/>
40+
<click selector="{{section.editableButtonItemElement(index)}}" stepKey="clickButtonToEdit"/>
41+
<pressKey selector="{{section.editableButtonItemElement(index)}}" userInput="{{text}}" stepKey="enterButtonText"/>
42+
<waitForElementVisible selector="{{section.buttonText(index, text)}}" stepKey="seeButtonText"/>
43+
<click selector="{{pageBuilderArea}}{{PageBuilderPanel.searchPanel}}" stepKey="unFocusLiveEdit"/>
44+
<waitForPageLoad stepKey="waitForUnFocus"/>
45+
</actionGroup>
2946
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/ContentTypeVideoActionGroup.xml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,74 @@
5050
<actualResult type="variable">ratioDifference</actualResult>
5151
</assertLessThanOrEqual>
5252
</actionGroup>
53+
<actionGroup name="validateVideoWithOnlyVideoUrl">
54+
<arguments>
55+
<argument name="page" defaultValue=""/>
56+
<argument name="index" defaultValue="1" type="string"/>
57+
<argument name="url" defaultValue=""/>
58+
<!-- This is 2 because the width and the height may both have fractions that could round by a maximum of 1 for each which makes the maximum 2-->
59+
<argument name="acceptableOffset" defaultValue="2" type="string"/>
60+
</arguments>
61+
<waitForElementVisible selector="{{page.base(index)}}" stepKey="waitForElement"/>
62+
<waitForElementVisible selector="{{page.source(index, url.renderedValue)}}" stepKey="waitForUrl"/>
63+
<waitForElementVisible selector="{{page.noWidth(index)}}" stepKey="waitForWidth"/>
64+
<comment userInput="Validate Aspect Ratio" stepKey="commentValidateAspectRatio"/>
65+
<executeJS function="return window.calculatedHeight = parseInt(getComputedStyle(document.evaluate(&quot;{{page.iframe(index)}}&quot;,document.body).iterateNext()).width) / 16 * 9" stepKey="calculatedHeight"/>
66+
<executeJS function="return window.actualHeight = parseInt(getComputedStyle(document.evaluate(&quot;{{page.iframe(index)}}&quot;,document.body).iterateNext()).height)" stepKey="actualHeight"/>
67+
<executeJS function="return Math.abs(window.calculatedHeight - window.actualHeight)" stepKey="ratioDifference"/>
68+
<assertLessThanOrEqual stepKey="assertRatio">
69+
<expectedResult type="int">{{acceptableOffset}}</expectedResult>
70+
<actualResult type="variable">ratioDifference</actualResult>
71+
</assertLessThanOrEqual>
72+
<grabAttributeFrom selector="{{page.iframe(index)}}" userInput="src" stepKey="videoSrc"/>
73+
<assertNotContains stepKey="assertNoAutoplay">
74+
<expectedResult type="string">autoplay</expectedResult>
75+
<actualResult type="variable">$videoSrc</actualResult>
76+
</assertNotContains>
77+
</actionGroup>
78+
<actionGroup name="validateVideoWithOnlyVideoUrlMp4">
79+
<arguments>
80+
<argument name="page" defaultValue=""/>
81+
<argument name="index" defaultValue="1" type="string"/>
82+
<argument name="url" defaultValue=""/>
83+
<!-- This is 2 because the width and the height may both have fractions that could round by a maximum of 1 for each which makes the maximum 2-->
84+
<argument name="acceptableOffset" defaultValue="2" type="string"/>
85+
</arguments>
86+
<waitForElementVisible selector="{{page.base(index)}}" stepKey="waitForElement"/>
87+
<waitForElementVisible selector="{{page.sourceVideo(index, url.renderedValue)}}" stepKey="waitForUrl"/>
88+
<waitForElementVisible selector="{{page.noWidth(index)}}" stepKey="waitForWidth"/>
89+
<comment userInput="Validate Aspect Ratio" stepKey="commentValidateAspectRatio"/>
90+
<executeJS function="return window.calculatedHeight = parseInt(getComputedStyle(document.evaluate(&quot;{{page.video(index)}}&quot;,document.body).iterateNext()).width) / 16 * 9" stepKey="calculatedHeight"/>
91+
<executeJS function="return window.actualHeight = parseInt(getComputedStyle(document.evaluate(&quot;{{page.video(index)}}&quot;,document.body).iterateNext()).height)" stepKey="actualHeight"/>
92+
<executeJS function="return Math.abs(window.calculatedHeight - window.actualHeight)" stepKey="ratioDifference"/>
93+
<assertLessThanOrEqual stepKey="assertRatio">
94+
<expectedResult type="int">{{acceptableOffset}}</expectedResult>
95+
<actualResult type="variable">ratioDifference</actualResult>
96+
</assertLessThanOrEqual>
97+
<waitForElementNotVisible selector="{{page.videoAutoplay(index)}}" stepKey="assertNoAutoplay"/>
98+
</actionGroup>
99+
<actionGroup name="validateVideoPlaying">
100+
<annotations>
101+
<description>Validates that the video content type is playing.</description>
102+
</annotations>
103+
<arguments>
104+
<argument name="page" defaultValue="VideoOnStage"/>
105+
<argument name="url" defaultValue="PageBuilderVideoUrl_Empty"/>
106+
<argument name="index" defaultValue="1" type="string"/>
107+
</arguments>
108+
<waitForPageLoad stepKey="waitForPageLoad"/>
109+
<waitForElementVisible selector="{{page.videoElement(index)}}" stepKey="waitForVideoVisible"/>
110+
<executeJS function="document.querySelector('[data-element=\'video\']').id = 'video-iframe'" stepKey="setIframeId"/>
111+
<switchToIFrame userInput="video-iframe" stepKey="switchToVideoIframe"/>
112+
<waitForElementVisible selector="{{page.iframePlaying(index)}}" stepKey="seeIframePlaying"/>
113+
<switchToIFrame stepKey="switchBackFromIframe"/>
114+
</actionGroup>
115+
<actionGroup name="validateVideoNotAutoplaying" extends="validateVideoPlaying">
116+
<annotations>
117+
<description>Validates that the video content type is not autoplaying.</description>
118+
</annotations>
119+
<waitForElementVisible selector="{{page.iframeNotAutoplaying(index)}}" stepKey="seeIframePlaying"/>
120+
</actionGroup>
53121
<actionGroup name="validateEmptyVideoStage">
54122
<arguments>
55123
<argument name="index" defaultValue="1" type="string"/>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/StageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
<argument name="index" defaultValue="1" type="string"/>
111111
</arguments>
112112
<attachFile userInput="{{property.value}}" selector="{{section.uploadImageInput(index)}}" stepKey="attachImageFromLocalToStage"/>
113-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
113+
<waitForPageLoad stepKey="waitForLoadingMaskToDisappear"/>
114114
<waitForElementVisible selector="{{section.imageSourceByIndex(index, property.fileName)}}" stepKey="waitForMainImageSource1"/>
115115
</actionGroup>
116116
<actionGroup name="verifyUploadImageButtons">

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/WYSIWYGActionGroup.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@
235235
<waitForElement selector="{{MediaGallerySection.StorageRootArrowClicked}}" stepKey="waitForStorageRootArrowClicked"/>
236236
</actionGroup>
237237
<actionGroup name="inlineEditWYSIWYGFromStage">
238+
<annotations>
239+
<description>Edits content in the inline wysiwyg editor on the stage in a content type.</description>
240+
</annotations>
238241
<arguments>
239242
<argument name="contentType"/>
240243
<argument name="content" type="string"/>
@@ -246,6 +249,24 @@
246249
<waitForPageLoad stepKey="waitForPageLoad"/>
247250
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="loseFocusFromEditor"/>
248251
</actionGroup>
252+
<actionGroup name="doubleClickToInlineEditWYSIWYGFromStage" extends="inlineEditWYSIWYGFromStage">
253+
<annotations>
254+
<description>Edits content in the inline wysiwyg editor on the stage in a content type. Used when a single click does not initialize the editor.</description>
255+
</annotations>
256+
<doubleClick selector="{{PageBuilderStage.inlineWYSIWYGEditor(contentType.role, index)}}" stepKey="focusOnEditorArea0" before="focusOnEditorArea"/>
257+
</actionGroup>
258+
<actionGroup name="openInlineWYSIWYGEditorOnStage">
259+
<annotations>
260+
<description>Opens the inline wysiwyg editor on the stage in a content type</description>
261+
</annotations>
262+
<arguments>
263+
<argument name="contentType"/>
264+
<argument name="index" defaultValue="1" type="string"/>
265+
</arguments>
266+
<waitForElement selector="{{PageBuilderStage.inlineWYSIWYGEditor(contentType.role, index)}}" stepKey="waitForEditor"/>
267+
<click selector="{{PageBuilderStage.inlineWYSIWYGEditor(contentType.role, index)}}" stepKey="clickEditor"/>
268+
<waitForElementVisible selector="{{PageBuilderStage.inlineWYSIWYGEditorPanel(contentType.role, index)}}" stepKey="waitForEditorPanelVisible"/>
269+
</actionGroup>
249270
<actionGroup name="inlineEditTextAreaFromStage">
250271
<arguments>
251272
<argument name="contentType"/>
@@ -358,4 +379,11 @@
358379
<waitForPageLoad stepKey="waitForPageLoad"/>
359380
<waitForElementVisible selector="{{section.tinymceInFocus(index)}}" stepKey="waitForTinyMCEInFocus"/>
360381
</actionGroup>
382+
<actionGroup name="verifyInlineTinyMCEEditorNotUnderOtherElements">
383+
<annotations>
384+
<description>Validates that the inline TinyMCE Editor is not hidden under another element.</description>
385+
</annotations>
386+
<waitForElementVisible selector="{{WYSIWYGOnPageBuilderInline.underline}}" stepKey="waitForUnderlineVisible"/>
387+
<click selector="{{WYSIWYGOnPageBuilderInline.underline}}" stepKey="clickUnderline"/>
388+
</actionGroup>
361389
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Data/CommonContentTypeData.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@
8383
<data key="value">100vh</data>
8484
<data key="style">min-height: 100vh</data>
8585
</entity>
86+
<entity name="PageBuilderMinHeightProperty_300vh" type="pagebuilder_min_height_property">
87+
<data key="name">Minimum Height</data>
88+
<data key="section">appearance_fieldset</data>
89+
<data key="fieldName">min_height</data>
90+
<data key="value">300vh</data>
91+
<data key="style">min-height: 300vh</data>
92+
</entity>
8693
<entity name="PageBuilderMinHeightProperty_100vh_Minus_200px" type="pagebuilder_min_height_property">
8794
<data key="name">Minimum Height</data>
8895
<data key="section">appearance_fieldset</data>

0 commit comments

Comments
 (0)