Skip to content

Commit 0efe4a4

Browse files
#510: User edits CMS page content in full-screen mode only
- fix mftf tests
1 parent c62b3a1 commit 0efe4a4

File tree

3 files changed

+15
-27
lines changed

3 files changed

+15
-27
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderHeadingTest/HeadingLiveEditToolbarNotCutOffInFullScreenModeTest.xml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,13 @@
7373
</assertGreaterThanOrEqual>
7474
<!-- Assert bottom of toolbar is above top of input box -->
7575
<comment userInput="Assert bottom of toolbar is above top of input box" stepKey="commentCheckToolbarAboveInputBox"/>
76-
<assertLessThanOrEqual stepKey="assertToolbarAboveInputBox">
77-
<expectedResult type="variable">$inputBoxTopPosition</expectedResult>
78-
<actualResult type="variable">$toolbarBottomPosition</actualResult>
79-
</assertLessThanOrEqual>
76+
<comment userInput="assertToolbarAboveInputBox" stepKey="assertToolbarAboveInputBox"/>
8077
<actionGroup ref="clickOutsideLiveEditHeading" stepKey="unFocusEditor">
8178
<argument name="index" value="1"/>
8279
</actionGroup>
8380
<!-- Set PageBuilder to full screen -->
8481
<comment userInput="Set PageBuilder to full screen" stepKey="commentSetFullScreen"/>
85-
<actionGroup ref="openPageBuilderFullScreen" stepKey="openFullScreen"/>
82+
<comment userInput="openPageBuilderFullScreen" stepKey="openFullScreen"/>
8683
<waitForElementVisible selector="{{HeadingOnStage.base('1')}}" stepKey="waitForContentTypeToBeVisible"/>
8784
<actionGroup ref="clickInsideLiveEditHeading" stepKey="focusOnInnerContentType">
8885
<argument name="index" value="1"/>
@@ -107,24 +104,16 @@
107104
</actionGroup>
108105
<!-- Exit full screen -->
109106
<comment userInput="Exit full screen" stepKey="commentExitFullScreen"/>
110-
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitFullScreen"/>
111-
<actionGroup ref="clickInsideLiveEditHeading" stepKey="focusOnInnerContentTypeAfterExitFullScreen">
112-
<argument name="index" value="1"/>
113-
</actionGroup>
114-
<executeJS function="{{HeadingOnStage.headingToolbarViewportPositionBottom('0')}}" stepKey="toolbarBottomPositionAfterExitFullScreen"/>
115-
<executeJS function="{{HeadingOnStage.headingToolbarViewportPositionTop('0')}}" stepKey="toolbarTopPositionAfterExitFullScreen"/>
116-
<executeJS function="{{HeadingOnStage.headingContentTypeViewportPositionTop('0')}}" stepKey="inputBoxTopPositionAfterExitFullScreen"/>
107+
<comment userInput="exitPageBuilderFullScreen" stepKey="exitFullScreen"/>
108+
<comment userInput="clickInsideLiveEditHeading" stepKey="focusOnInnerContentTypeAfterExitFullScreen"/>
109+
<comment userInput="toolbarBottomPositionAfterExitFullScreen" stepKey="toolbarBottomPositionAfterExitFullScreen"/>
110+
<comment userInput="toolbarTopPositionAfterExitFullScreen" stepKey="toolbarTopPositionAfterExitFullScreen"/>
111+
<comment userInput="inputBoxTopPositionAfterExitFullScreen" stepKey="inputBoxTopPositionAfterExitFullScreen"/>
117112
<!-- Assert toolbar did not overflow after exit full screen-->
118113
<comment userInput="Assert toolbar did not overflow after exit full screen" stepKey="commentAssertToolbarNotOverflowAfterExitFullScreen"/>
119-
<assertGreaterThanOrEqual stepKey="assertToolbarTopBoundingClientRectIsNotNegativeAfterExitFullScreen">
120-
<expectedResult type="int">0</expectedResult>
121-
<actualResult type="variable">$toolbarTopPositionAfterExitFullScreen</actualResult>
122-
</assertGreaterThanOrEqual>
114+
<comment userInput="assertToolbarTopBoundingClientRectIsNotNegativeAfterExitFullScreen" stepKey="assertToolbarTopBoundingClientRectIsNotNegativeAfterExitFullScreen"/>
123115
<!-- Check bottom of toolbar is above top of input box -->
124116
<comment userInput="Check bottom of toolbar is above top of input box" stepKey="commentCheckToolbarAboveInputBoxAfterExitFullScreen"/>
125-
<assertLessThanOrEqual stepKey="assertToolbarAboveInputBoxAfterExitFullScreen">
126-
<expectedResult type="variable">$inputBoxTopPositionAfterExitFullScreen</expectedResult>
127-
<actualResult type="variable">$toolbarBottomPositionAfterExitFullScreen</actualResult>
128-
</assertLessThanOrEqual>
117+
<comment userInput="assertToolbarAboveInputBoxAfterExitFullScreen" stepKey="assertToolbarAboveInputBoxAfterExitFullScreen"/>
129118
</test>
130119
</tests>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderTextTest/TextTooltipMenusAreNotCutOffInFullScreenModeTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
<actionGroup ref="unFocusOptionMenu" stepKey="unFocusEditorAfterOverflow">
5252
<argument name="contentType" value="PageBuilderTextContentType"/>
5353
</actionGroup>
54-
<click selector="{{TextOnStage.wysiwyg('1')}}" stepKey="focusOnInnerContentTypeAfterExitFullScreen"/>
55-
<waitForPageLoad after="focusOnInnerContentTypeAfterExitFullScreen" stepKey="waitForToolbarAnimationAfterExitFullScreen"/>
56-
<waitForElementVisible selector="{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderTextContentType.role, '1')}}" after="waitForToolbarAnimationAfterExitFullScreen" stepKey="waitForToolbarVisibleAfterExitFullScreen"/>
57-
<executeJS function="return document.evaluate(`{{TextOnStage.wysiwyg('1')}}`, document.body).iterateNext().getBoundingClientRect().top" stepKey="inputBoxTopPositionAfterExitFullScreen"/>
58-
<executeJS function="return document.evaluate(`{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderTextContentType.role, '1')}}`, document.body).iterateNext().getBoundingClientRect().top" stepKey="toolbarTopPositionAfterExitFullScreen"/>
59-
<executeJS function="return document.evaluate(`{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderTextContentType.role, '1')}}`, document.body).iterateNext().getBoundingClientRect().bottom" stepKey="toolbarBottomPositionAfterExitFullScreen"/>
54+
<comment userInput="focusOnInnerContentTypeAfterExitFullScreen" stepKey="focusOnInnerContentTypeAfterExitFullScreen"/>
55+
<comment userInput="waitForToolbarAnimationAfterExitFullScreen" stepKey="waitForToolbarAnimationAfterExitFullScreen"/>
56+
<comment userInput="waitForToolbarVisibleAfterExitFullScreen" stepKey="waitForToolbarVisibleAfterExitFullScreen"/>
57+
<comment userInput="toolbarBottomPositionAfterExitFullScreen" stepKey="toolbarBottomPositionAfterExitFullScreen"/>
58+
<comment userInput="toolbarTopPositionAfterExitFullScreen" stepKey="toolbarTopPositionAfterExitFullScreen"/>
59+
<comment userInput="inputBoxTopPositionAfterExitFullScreen" stepKey="inputBoxTopPositionAfterExitFullScreen"/>
6060
</test>
6161
</tests>

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/_page-builder.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@
344344
position: relative;
345345
top: 0;
346346
width: calc(~'100% - 150px');
347-
z-index: 106;
348347
}
349348
}
350349
}

0 commit comments

Comments
 (0)