Skip to content

Commit 5558a77

Browse files
committed
MC-5383: Option Menus, Heading Inline Editor & tinyMCE Inline Editor Are Cut Off on Full Screen View
Update TooltipMenusAreNotCutOffInFullScreenMode to address review feedback
1 parent 042fb8f commit 5558a77

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderPanelTest.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,8 @@
497497
</annotations>
498498
<before>
499499
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
500+
<magentoCLI command="config:set cms/wysiwyg/editor mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter" stepKey="enableTinyMCE4"/>
501+
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/>
500502
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
501503
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
502504
</before>
@@ -525,8 +527,11 @@
525527
<waitForElementVisible selector="{{PageBuilderStage.stageWrapperFullScreen}}" stepKey="waitForStageFullScreen"/>
526528
<waitForElementVisible selector="{{PageBuilderStage.exitFullScreen}}" stepKey="waitForExitFullScreenButton"/>
527529
<waitForElementNotVisible selector="{{PageBuilderStage.stageWrapper}}" stepKey="verifyStageNotNormalScreen"/>
530+
<!-- Explicit wait for CSS animation to complete -->
528531
<wait time="1" stepKey="waitForFullScreenTransitionAnimationToFinish" />
532+
<waitForElementVisible selector="{{TextOnStage.wysiwyg('1')}}" stepKey="waitForTextEditorToBeVisible" />
529533
<click selector="{{TextOnStage.wysiwyg('1')}}" stepKey="focusOnTextEditorArea"/>
534+
<!-- Explicit wait for CSS animation to complete -->
530535
<wait time="1" stepKey="waitForInlineWysiwygToolbarTransitionAnimationToFinish" />
531536
<waitForElementVisible selector="{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderTextContentType.role, '1')}}" stepKey="waitForWYWSIWYGEditorPanelToBeVisible"/>
532537
<executeJS function="return document.evaluate(`{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderTextContentType.role, '1')}}`, document.body).iterateNext().getBoundingClientRect().top" stepKey="topBoundingClientRect"/>
@@ -536,5 +541,30 @@
536541
<expectedResult type="int">0</expectedResult>
537542
<actualResult type="variable">$topBoundingClientRect</actualResult>
538543
</assertGreaterThanOrEqual>
544+
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusEditor"/>
545+
<comment userInput="Shrink column down to 1/3 its original size" stepKey="commentShrinkColumnToOneThirdItsOriginalSize" />
546+
<actionGroup ref="duplicateContentType" stepKey="duplicateColumn">
547+
<argument name="contentType" value="PageBuilderColumnContentType"/>
548+
<argument name="targetIndex" value="1"/>
549+
<argument name="contentTypeXCoordinate" value="10"/>
550+
<argument name="contentTypeYCoordinate" value="0"/>
551+
</actionGroup>
552+
<actionGroup ref="duplicateContentType" stepKey="duplicateColumnAgain">
553+
<argument name="contentType" value="PageBuilderColumnContentType"/>
554+
<argument name="targetIndex" value="1"/>
555+
<argument name="contentTypeXCoordinate" value="10"/>
556+
<argument name="contentTypeYCoordinate" value="0"/>
557+
</actionGroup>
558+
<click selector="{{TextOnStage.wysiwyg('1')}}" stepKey="focusOnTextEditorArea2"/>
559+
<!-- Explicit wait for CSS animation to complete -->
560+
<wait time="1" stepKey="waitForInlineWysiwygToolbarTransitionAnimationToFinish2" />
561+
<waitForElementVisible selector="{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderTextContentType.role, '1')}}" stepKey="waitForWYWSIWYGEditorPanelToBeVisible2"/>
562+
<executeJS function="return document.evaluate(`{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderTextContentType.role, '1')}}`, document.body).iterateNext().getBoundingClientRect().top" stepKey="topBoundingClientRect2"/>
563+
<!-- Assert top bounding client rect > 0 -->
564+
<comment userInput="Assert top bounding client rect > 0 when column is 1/3 its original size" stepKey="commentAssertInlineEditorAppearsInSmallerColumn" />
565+
<assertGreaterThanOrEqual stepKey="assertTopBoundingClientRectIsGreaterThan0InSmallerColumn">
566+
<expectedResult type="int">0</expectedResult>
567+
<actualResult type="variable">$topBoundingClientRect2</actualResult>
568+
</assertGreaterThanOrEqual>
539569
</test>
540570
</tests>

0 commit comments

Comments
 (0)