Skip to content

Commit 4b1d117

Browse files
committed
PB-273: Remove 200ms delay from options menu & toolbar on content types
1 parent 83b55ff commit 4b1d117

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,29 @@
131131
<arguments>
132132
<argument name="section" defaultValue="TextOnStage"/>
133133
<argument name="index" defaultValue="1" type="string"/>
134-
<argument name="contentTypeXCoordinate" defaultValue="10" type="string"/>
135-
<argument name="contentTypeYCoordinate" defaultValue="10" type="string"/>
134+
<argument name="contentTypeXCoordinate" defaultValue="0" type="string"/>
135+
<argument name="contentTypeYCoordinate" defaultValue="0" type="string"/>
136136
</arguments>
137137
<comment userInput="focusOnInlineTinyMCEEditor" stepKey="comment"/>
138138
<waitForElementVisible selector="{{section.tinymce(index)}}" stepKey="waitForEditor"/>
139139
<clickWithLeftButton selector="{{section.tinymce(index)}}" x="{{contentTypeXCoordinate}}" y="{{contentTypeYCoordinate}}" stepKey="clickEditor"/>
140140
<waitForPageLoad stepKey="waitForEditorToBeFocused"/>
141141
<waitForElementVisible selector="{{section.tinymceInFocus(index)}}" stepKey="waitForEditorFocused"/>
142142
</actionGroup>
143+
<actionGroup name="moveCaretToEndTinyMCEEditor">
144+
<arguments>
145+
<argument name="section" defaultValue="TextOnStage"/>
146+
<argument name="index" defaultValue="1" type="string"/>
147+
</arguments>
148+
<waitForElementVisible selector="{{section.tinymce(index)}}" stepKey="waitForEditor"/>
149+
<pressKey selector="{{section.tinymce(index)}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::END]" stepKey="pressEndKey"/>
150+
</actionGroup>
143151
<actionGroup name="focusOnInlineTextAreaEditor">
144152
<arguments>
145153
<argument name="section" defaultValue="TextOnStage"/>
146154
<argument name="index" defaultValue="1" type="string"/>
147-
<argument name="contentTypeXCoordinate" defaultValue="10" type="string"/>
148-
<argument name="contentTypeYCoordinate" defaultValue="10" type="string"/>
155+
<argument name="contentTypeXCoordinate" defaultValue="0" type="string"/>
156+
<argument name="contentTypeYCoordinate" defaultValue="0" type="string"/>
149157
</arguments>
150158
<comment userInput="focusOnInlineTextAreaEditor" stepKey="comment"/>
151159
<waitForElementVisible selector="{{section.textArea(index)}}" stepKey="waitForEditor"/>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,26 +144,30 @@
144144
<!-- Inline Edit: Add Text -->
145145
<comment userInput="Inline Edit: Add Text" stepKey="commentInlineEditAddText"/>
146146
<actionGroup ref="focusOnInlineTinyMCEEditor" stepKey="focusOnInlineTinyMCEEditor"/>
147+
<actionGroup ref="moveCaretToEndTinyMCEEditor" stepKey="moveCaretToEnd"/>
147148
<actionGroup ref="addTextToTinyMCEInline" stepKey="addTextToTinyMCEInline">
148149
<argument name="section" value="TextOnStage"/>
149150
<argument name="text" value="{{PageBuilderTextProperty.value}}"/>
150151
</actionGroup>
151152
<!-- Inline Edit: Add Variable -->
152153
<comment userInput="Inline Edit: Add Variable" stepKey="commentInlineEditAddVariable"/>
153154
<actionGroup ref="focusOnInlineTinyMCEEditor" stepKey="focusOnInlineTinyMCEEditor2"/>
155+
<actionGroup ref="moveCaretToEndTinyMCEEditor" stepKey="moveCaretToEnd2"/>
154156
<actionGroup ref="addVariableToTinyMCEInline" stepKey="addVariableToTinyMCE">
155157
<argument name="variable" value="TinyMCEVariableBaseURL"/>
156158
</actionGroup>
157159
<!-- Inline Edit: Add Widget -->
158160
<comment userInput="Inline Edit: Add Widget" stepKey="commentInlineEditAddWidget"/>
159161
<actionGroup ref="focusOnInlineTinyMCEEditor" stepKey="focusOnInlineTinyMCEEditor3"/>
162+
<actionGroup ref="moveCaretToEndTinyMCEEditor" stepKey="moveCaretToEnd3"/>
160163
<actionGroup ref="addPageLinkWidgetToTinyMCEInline" stepKey="addPageLinkWidgetToTinyMCE">
161164
<argument name="widget" value="TinyMCEWidgetCMSPageLink"/>
162165
<argument name="page" value="$$createPreReqCMSPage.identifier$$"/>
163166
</actionGroup>
164167
<!-- Inline Edit: Add Image -->
165168
<comment userInput="Inline Edit: Add Image" stepKey="commentInlineEditAddImage"/>
166169
<actionGroup ref="focusOnInlineTinyMCEEditor" stepKey="focusOnInlineTinyMCEEditor4"/>
170+
<actionGroup ref="moveCaretToEndTinyMCEEditor" stepKey="moveCaretToEnd4"/>
167171
<actionGroup ref="clickInsertImageInTinyMCE" stepKey="clickInsertImageInTinyMCE"/>
168172
<actionGroup ref="clickBrowseBtnOnUploadPopup" stepKey="clickBrowserBtn"/>
169173
<actionGroup ref="VerifyMediaGalleryStorageActions" stepKey="VerifyMediaGalleryStorageBtn"/>

0 commit comments

Comments
 (0)