Skip to content

Commit 8da3cfb

Browse files
committed
MC-5383: Option Menus, Heading Inline Editor & tinyMCE Inline Editor Are Cut Off on Full Screen View
Add TooltipMenusAreNotCutOffInFullScreenMode
1 parent 212ea9b commit 8da3cfb

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,4 +483,56 @@
483483
<scrollTo selector="{{RowOnStage.base('6')}}" stepKey="scrollToBottom2"/>
484484
<seeElement selector="{{PageBuilderPanel.panelGroup('Layout')}}" stepKey="verifyPanel2"/>
485485
</test>
486+
<test name="TooltipMenusAreNotCutOffInFullScreenMode">
487+
<annotations>
488+
<features value="PageBuilder"/>
489+
<stories value="Panel"/>
490+
<title value="Tooltip menus should not overflow viewport bounds (get 'cut off') in full screen mode"/>
491+
<description value="As a content creator I want tooltip menus to be always positioned within viewport bounds so that they are accessible to me within the UI"/>
492+
<severity value="MAJOR"/>
493+
<useCaseId value="MC-5383"/>
494+
<testCaseId value="MC-6491"/>
495+
<group value="pagebuilder"/>
496+
<group value="pagebuilder-panel"/>
497+
</annotations>
498+
<before>
499+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
500+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
501+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
502+
</before>
503+
<after>
504+
<actionGroup ref="logout" stepKey="logout"/>
505+
</after>
506+
<!-- Add Column Content Type -->
507+
<comment userInput="Add Column Content Type" stepKey="commentAddColumnContentType"/>
508+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroupForColumnContentType">
509+
<argument name="group" value="PageBuilderColumnContentType"/>
510+
</actionGroup>
511+
<actionGroup ref="dragContentTypeToStage" stepKey="dragColumnToStage">
512+
<argument name="contentType" value="PageBuilderColumnContentType"/>
513+
</actionGroup>
514+
<!-- Add Text Content Type -->
515+
<comment userInput="Add Text Content Type" stepKey="commentAddTextContentType"/>
516+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroupForTextContentType">
517+
<argument name="group" value="PageBuilderTextContentType"/>
518+
</actionGroup>
519+
<actionGroup ref="dragContentTypeToStage" stepKey="dragTextToStage">
520+
<argument name="contentType" value="PageBuilderTextContentType"/>
521+
</actionGroup>
522+
<!-- Open fullscreen -->
523+
<comment userInput="Open fullscreen" stepKey="commentOpenFullscreen"/>
524+
<click selector="{{PageBuilderStage.openFullScreen}}" stepKey="enterFullScreen"/>
525+
<waitForElementVisible selector="{{PageBuilderStage.stageWrapperFullScreen}}" stepKey="waitForStageFullScreen"/>
526+
<waitForElementVisible selector="{{PageBuilderStage.exitFullScreen}}" stepKey="waitForExitFullScreenButton"/>
527+
<waitForElementNotVisible selector="{{PageBuilderStage.stageWrapper}}" stepKey="verifyStageNotNormalScreen"/>
528+
<click selector="{{TextOnStage.wysiwyg('1')}}" stepKey="focusOnTextEditorArea"/>
529+
<waitForElementVisible selector="{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderTextContentType.role, '1')}}" stepKey="waitForWYWSIWYGEditorPanelToBeVisible"/>
530+
<executeJS function="return document.evaluate(`{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderTextContentType.role, '1')}}`, document.body).iterateNext().getBoundingClientRect().top" stepKey="topBoundingClientRect"/>
531+
<!-- Assert top bounding client rect > 0 -->
532+
<comment userInput="Assert top bounding client rect > 0" stepKey="commentAssertTopBoundingClientRectGreaterThan0" />
533+
<assertGreaterThanOrEqual stepKey="assertTopBoundingClientRectIsGreaterThan0">
534+
<expectedResult type="int">0</expectedResult>
535+
<actualResult type="variable">$topBoundingClientRect</actualResult>
536+
</assertGreaterThanOrEqual>
537+
</test>
486538
</tests>

0 commit comments

Comments
 (0)