Skip to content

Commit e3b6f5e

Browse files
committed
PB-170: TinyMCE Performance is very poor with multiple instances on Stage
- Improve stability of tests
1 parent 3a340b6 commit e3b6f5e

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,16 @@
313313
<argument name="index" defaultValue="1" type="string"/>
314314
<argument name="variable"/>
315315
</arguments>
316+
<waitForElementVisible selector="{{section.directive(index, variable.editPanelValue)}}" stepKey="waitForVariableVisible"/>
316317
<doubleClick selector="{{section.directive(index, variable.editPanelValue)}}" stepKey="doubleClickOnVariablePlaceholder"/>
317-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
318+
<waitForPageLoad stepKey="waitForPageLoad"/>
318319
<waitForElementVisible selector="{{VariableSection.CancelBtnEnabled}}" stepKey="waitForCancelButton"/>
319320
<waitForElementVisible selector="{{VariableSection.Radio(variable.variableName)}}" stepKey="waitForVariableAfterDoubleClick"/>
320321
</actionGroup>
321322
<actionGroup name="closeVariablePanelTinyMCE">
322323
<waitForElementVisible selector="{{VariableSection.CancelBtnEnabled}}" stepKey="waitForCancelButton"/>
323324
<click selector="{{VariableSection.CancelBtnEnabled}}" stepKey="clickCancelButton"/>
325+
<waitForPageLoad stepKey="waitForPageLoad"/>
324326
<waitForElementNotVisible selector="{{VariableSection.CancelBtnEnabled}}" stepKey="waitForVariableCancelNotVisible"/>
325327
</actionGroup>
326328
<actionGroup name="doubleClickWidgetTinyMCE">
@@ -329,13 +331,25 @@
329331
<argument name="index" defaultValue="1" type="string"/>
330332
<argument name="widget"/>
331333
</arguments>
334+
<waitForElementVisible selector="{{section.directive('1', TinyMCEWidgetCMSPageLink.editPanelValue)}}" stepKey="waitForWidgetVisible"/>
332335
<doubleClick selector="{{section.directive('1', TinyMCEWidgetCMSPageLink.editPanelValue)}}" stepKey="doubleClickOnWidgetPlaceholder"/>
333336
<waitForPageLoad stepKey="waitForPageLoad"/>
334-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
335337
<waitForElementVisible selector="{{WidgetSection.CancelBtnEnabled}}" stepKey="waitForWidgetType"/>
336338
</actionGroup>
337339
<actionGroup name="closeWidgetPanelTinyMCE">
338-
<click selector="{{WidgetSection.CancelBtnEnabled}}" stepKey="clickInsertWidget3"/>
339-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear7"/>
340+
<waitForElementVisible selector="{{WidgetSection.CancelBtnEnabled}}" stepKey="waitForCancelButton"/>
341+
<click selector="{{WidgetSection.CancelBtnEnabled}}" stepKey="clickInsertWidget"/>
342+
<waitForPageLoad stepKey="waitForPageLoad"/>
343+
<waitForElementNotVisible selector="{{WidgetSection.CancelBtnEnabled}}}" stepKey="waitForCancelButtonNotVisible"/>
344+
</actionGroup>
345+
<actionGroup name="focusTinyMCE">
346+
<arguments>
347+
<argument name="section" defaultValue="TextOnStage"/>
348+
<argument name="index" defaultValue="1" type="string"/>
349+
</arguments>
350+
<waitForElementVisible selector="{{section.tinymce(index)}}" stepKey="waitForTinyMCE"/>
351+
<click selector="{{section.tinymce(index)}}" stepKey="focusOnTextEditorArea"/>
352+
<waitForPageLoad stepKey="waitForPageLoad"/>
353+
<waitForElementVisible selector="{{section.tinymceFocused(index)}}" stepKey="waitForTinyMCEFocus"/>
340354
</actionGroup>
341355
</actionGroups>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2840,7 +2840,7 @@
28402840
<actionGroup ref="seeDirectiveFocusedTinyMCE" stepKey="seeDirectiveFocusedTinyMCE">
28412841
<argument name="labelValue" value="TinyMCEVariableBaseURL.editPanelValue" />
28422842
</actionGroup>
2843-
<!-- Save page and verify single clicking on widget will retain selection -->
2843+
<!-- Save page and verify single clicking on variable will retain selection -->
28442844
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
28452845
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
28462846
<actionGroup ref="clickDirectiveTinyMCE" stepKey="clickDirectiveTinyMCE2">
@@ -3019,8 +3019,8 @@
30193019
<title value="TinyMCE4 selection is preserved after initiation"/>
30203020
<description value="Verify that a users selection is not lost between select and initiation"/>
30213021
<severity value="AVERAGE"/>
3022-
<useCaseId value="MC-29450"/>
3023-
<testCaseId value="PB-303"/>
3022+
<useCaseId value="PB-170"/>
3023+
<testCaseId value="MC-29450"/>
30243024
<group value="pagebuilder"/>
30253025
<group value="pagebuilder-text"/>
30263026
</annotations>
@@ -3039,10 +3039,10 @@
30393039
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection1">
30403040
<argument name="contentType" value="PageBuilderTextContentType"/>
30413041
</actionGroup>
3042-
<actionGroup ref="dragContentTypeToStage" stepKey="dragButtonsOntoStage">
3042+
<actionGroup ref="dragContentTypeToStage" stepKey="dragTextOntoStage">
30433043
<argument name="contentType" value="PageBuilderTextContentType"/>
30443044
</actionGroup>
3045-
<click selector="{{TextOnStage.tinymce('1')}}" stepKey="focusOnTextEditorArea"/>
3045+
<actionGroup ref="focusTinyMCE" stepKey="focusTinyMCE"/>
30463046
<!-- Create new Heading 2 -->
30473047
<actionGroup ref="formatTextTinyMCE" stepKey="formatTextHeading2">
30483048
<argument name="format" value="TinyMCEFormatHeading2"/>

0 commit comments

Comments
 (0)