Skip to content

Commit 08054d3

Browse files
committed
#609: Content Type Toolbar hidden under PageBuilder header in Full screen
- Fixing MFTF tests
1 parent 5a82151 commit 08054d3

File tree

4 files changed

+55
-15
lines changed

4 files changed

+55
-15
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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="AdminVerifyTinyMCEToolbarButtonsActionGroup">
12+
<annotations>
13+
<description>Validates that all of the Tiny MCE buttons are present in the specified Tiny MCE toolbar.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="section" defaultValue="WYSIWYGOnPageBuilderInline"/>
17+
</arguments>
18+
<waitForElementVisible selector="{{section.toolbar}}" stepKey="waitForToolbar"/>
19+
<seeElement selector="{{section.undo}}" stepKey="seeUndo"/>
20+
<seeElement selector="{{section.redo}}" stepKey="seeRedo"/>
21+
<seeElement selector="{{section.formatSelector}}" stepKey="seeFormatSelector"/>
22+
<seeElement selector="{{section.fontSize}}" stepKey="seeFontSize"/>
23+
<seeElement selector="{{section.lineHeight}}" stepKey="seeLineHeight"/>
24+
<seeElement selector="{{section.textColor}}" stepKey="seeTextColor"/>
25+
<seeElement selector="{{section.backgroundColor}}" stepKey="seeBackgroundColor"/>
26+
<seeElement selector="{{section.bold}}" stepKey="seeBold"/>
27+
<seeElement selector="{{section.italic}}" stepKey="seeItalic"/>
28+
<seeElement selector="{{section.underline}}" stepKey="seeUnderline"/>
29+
<seeElement selector="{{section.alignLeft}}" stepKey="seeAlignLeft"/>
30+
<seeElement selector="{{section.alignCenter}}" stepKey="seeAlignCenter"/>
31+
<seeElement selector="{{section.alignRight}}" stepKey="seeAlignRight"/>
32+
<seeElement selector="{{section.numberedList}}" stepKey="seeNumberedList"/>
33+
<seeElement selector="{{section.bulletList}}" stepKey="seeBulletList"/>
34+
<seeElement selector="{{section.insertLink}}" stepKey="seeInsertLink"/>
35+
<seeElement selector="{{section.imageSelector}}" stepKey="seeImageSelector"/>
36+
<seeElement selector="{{section.table}}" stepKey="seeTable"/>
37+
<seeElement selector="{{section.specialCharacter}}" stepKey="seeSpecialCharacter"/>
38+
<seeElement selector="{{section.insertWidget}}" stepKey="seeInsertWidget"/>
39+
<seeElement selector="{{section.insertVariable}}" stepKey="seeInsertVariable"/>
40+
</actionGroup>
41+
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderWYSIWYGSection/WYSIWYGOnPageBuilderInlineSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="WYSIWYGOnPageBuilderInline">
11+
<element name="toolbar" type="button" selector=".mce-tinymce.mce-tinymce-inline"/>
1112
<element name="inlineCss" type="button" selector=".mce-tinymce.mce-tinymce-inline"/>
1213
<element name="notCss" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline)"/>
1314
<element name="undo" type="button" selector=".mce-tinymce-inline div[aria-label='Undo']"/>

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,21 @@
130130
</actionGroup>
131131
<seeElement selector="{{ColumnOnBackend.displayLabel('1','3/12')}}" stepKey="validateColumnWidth"/>
132132
<!-- Add Another Heading Content Type -->
133-
<comment userInput="Add Heading Content Type" stepKey="commentAddInnerHeadingContentType"/>
134-
<actionGroup ref="dragContentTypeToStage" stepKey="dragHeadingContentTypeIntoColumn">
133+
<actionGroup ref="dragContentTypeToContainer" stepKey="dragHeadingContentTypeIntoColumn2">
135134
<argument name="contentType" value="PageBuilderHeadingContentType"/>
136135
<argument name="containerTargetType" value="PageBuilderColumnContentType"/>
136+
<argument name="containerTargetIndex" value="1"/>
137+
<argument name="contentTypeIndex" value="1"/>
137138
</actionGroup>
138139
<executeJS function="{{HeadingOnStage.headingToolbarViewportPositionTop('0')}}" stepKey="toolbarTopPositionInMediumColumn"/>
139140
<executeJS function="{{HeadingOnStage.headingContentTypeViewportPositionBottom('0')}}" stepKey="inputBoxBottomPositionInMediumColumn"/>
140141
<executeJS function="{{HeadingOnStage.headingContentTypeViewportPositionTop('0')}}" stepKey="inputBoxTopPositionInMediumColumn"/>
141-
<comment userInput="Assert toolbar did not overflow" stepKey="commentAssertToolbarNotOverflowInMediumColumn"/>
142142
<!-- Assert toolbar did not overflow in 3/12 column -->
143143
<assertGreaterThanOrEqual stepKey="assertToolbarTopBoundingClientRectIsNotNegativeInMediumColumn">
144144
<expectedResult type="int">0</expectedResult>
145145
<actualResult type="variable">$inputBoxTopPositionInMediumColumn</actualResult>
146146
</assertGreaterThanOrEqual>
147147
<!-- Check top of toolbar is below bottom of input box in 3/12 column -->
148-
<comment userInput="Check top of toolbar is below bottom of input box in 3/12 column" stepKey="commentCheckToolbarBelowInputBoxInMediumColumn"/>
149148
<assertGreaterThanOrEqual stepKey="assertToolbarAboveInputBoxInMediumColumn">
150149
<expectedResult type="variable">$inputBoxBottomPositionInMediumColumn</expectedResult>
151150
<actualResult type="variable">$toolbarTopPositionInMediumColumn</actualResult>

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

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,13 @@
124124
<argument name="contentTypeNumber" value="1"/>
125125
</actionGroup>
126126
<actionGroup ref="confirmRemovalModal" stepKey="confirmHTMLCodeRemoval"/>
127+
<!-- Remove Text Content Type -->
127128
<actionGroup ref="removeContentTypeFromStageByIndex" stepKey="removeTextContentType">
128129
<argument name="contentType" value="PageBuilderTextContentType"/>
129130
<argument name="contentTypeNumber" value="1"/>
130131
</actionGroup>
131132
<actionGroup ref="confirmRemovalModal" stepKey="confirmTextRemoval"/>
132-
<!-- Verify TinyMCE4 toolbar in 9/12 column -->
133+
<!-- Create 9/12 column -->
133134
<actionGroup ref="dragContentTypeToStage" stepKey="dragColumnIntoStage">
134135
<argument name="contentType" value="PageBuilderColumnContentType"/>
135136
</actionGroup>
@@ -141,21 +142,19 @@
141142
<argument name="contentType" value="PageBuilderColumnContentType"/>
142143
<argument name="contentTypeNumber" value="1"/>
143144
</actionGroup>
145+
<!-- Assert toolbar did not overflow in 9/12 column -->
144146
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection2">
145147
<argument name="contentType" value="PageBuilderTextContentType"/>
146148
</actionGroup>
147-
<actionGroup ref="dragContentTypeToStage" stepKey="dragTextContentTypeIntoColumn">
149+
<actionGroup ref="dragContentTypeToContainer" stepKey="dragTextContentTypeIntoColumn">
148150
<argument name="contentType" value="PageBuilderTextContentType"/>
149151
<argument name="containerTargetType" value="PageBuilderColumnContentType"/>
152+
<argument name="containerTargetIndex" value="1"/>
153+
<argument name="contentTypeIndex" value="1"/>
150154
</actionGroup>
151-
<clickWithLeftButton x="10" y="10" selector="{{TextOnStage.tinymce('1')}}" stepKey="focusAgainOnEditorArea"/>
152-
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE4InColumnContentType"/>
153-
<actionGroup ref="VerifyMagentoEntityActionGroup" stepKey="verifyMagentoEntitiesInColumnContentType"/>
154-
<seeElement selector="{{WYSIWYGOnPageBuilderInline.undo}}" stepKey="seeUndoInColumnContentType"/>
155-
<seeElement selector="{{WYSIWYGOnPageBuilderInline.redo}}" stepKey="seeRedoInColumnContentType"/>
156-
<seeElement selector="{{WYSIWYGOnPageBuilderInline.fontSize}}" stepKey="seeFontsizeInColumnContentType"/>
157-
<seeElement selector="{{WYSIWYGOnPageBuilderInline.lineHeight}}" stepKey="seeLineHeightInColumnContentType"/>
158-
<seeElement selector="{{WYSIWYGOnPageBuilderInline.textColor}}" stepKey="seeTextColorInColumnContentType"/>
159-
<seeElement selector="{{WYSIWYGOnPageBuilderInline.backgroundColor}}" stepKey="seeBackgroundColorInColumnContentType"/>
155+
<actionGroup ref="focusOnInlineTinyMCEEditor" stepKey="focusOnInlineTinyMCEEditor">
156+
<argument name="section" value="TextOnStage"/>
157+
</actionGroup>
158+
<actionGroup ref="AdminVerifyTinyMCEToolbarButtonsActionGroup" stepKey="verifyTinyMCE4InColumnContentType"/>
160159
</test>
161160
</tests>

0 commit comments

Comments
 (0)