Skip to content

Commit 3635974

Browse files
committed
Merge remote-tracking branch 'origin/MC-3908-drag-text-content-flash' into pagebuilder-delivery
2 parents ebf0c6d + 415f351 commit 3635974

27 files changed

+254
-97
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="clickOutsideTextInlineEditing">
12+
<comment userInput="Click outside text editable area" stepKey="commentClickOutside"/>
13+
<moveMouseOver selector="{{PageBuilderPanel.searchPanel}}" stepKey="moveMouseOutsideLiveEdit"/>
14+
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="clickOutsideLiveEdit"/>
15+
<waitForPageLoad stepKey="waitForAnimation"/>
16+
</actionGroup>
17+
</actionGroups>

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,19 @@
2727
<argument name="variable" defaultValue=""/>
2828
</arguments>
2929
<comment userInput="Adding Variable To Tiny MCE" stepKey="commentAddVariableToTinyMCE"/>
30-
<waitForElementVisible selector="{{TinyMCESection.InsertVariableIcon}}" stepKey="waitForInsertVariable1"/>
31-
<click selector="{{TinyMCESection.InsertVariableIcon}}" stepKey="clickInsertVariable1"/>
30+
<waitForElementVisible selector="{{WYSIWYGInline.notCss}} {{TinyMCESection.InsertVariableIcon}}" stepKey="waitForInsertVariable1"/>
31+
<click selector="{{WYSIWYGInline.notCss}} {{TinyMCESection.InsertVariableIcon}}" stepKey="clickInsertVariable1"/>
3232
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
3333
<waitForElementVisible selector="{{VariableSection.Radio(variable.variableName)}}" stepKey="waitForVariable1"/>
3434
<checkOption selector="{{VariableSection.Radio(variable.variableName)}}" stepKey="selectVariable"/>
3535
<waitForElementVisible selector="{{VariableSection.InsertWidget}}" stepKey="waitForInsertVariable2"/>
3636
<click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariable2"/>
3737
<waitForElementNotVisible selector="{{VariableSection.InsertWidget}}" stepKey="waitForVariableModalToClose"/>
3838
</actionGroup>
39+
<actionGroup name="addVariableToTinyMCEInline" extends="addVariableToTinyMCE">
40+
<waitForElementVisible selector="{{TinyMCESection.InsertVariableIcon}}" stepKey="waitForInsertVariable1"/>
41+
<click selector="{{TinyMCESection.InsertVariableIcon}}" stepKey="clickInsertVariable1"/>
42+
</actionGroup>
3943
<actionGroup name="addVariableToTinyMCE3" extends="addVariableToTinyMCE">
4044
<arguments>
4145
<argument name="variable" defaultValue=""/>
@@ -67,8 +71,8 @@
6771
<argument name="page" defaultValue="" type="string"/>
6872
</arguments>
6973
<comment userInput="Adding Widget To Tiny MCE" stepKey="commentAddWidget"/>
70-
<waitForElementVisible selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="waitForInsertWidget1"/>
71-
<click selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="clickAddWidgetBtn"/>
74+
<waitForElementVisible selector="{{WYSIWYGInline.notCss}} {{TinyMCESection.InsertWidgetIcon}}" stepKey="waitForInsertWidget1"/>
75+
<click selector="{{WYSIWYGInline.notCss}} {{TinyMCESection.InsertWidgetIcon}}" stepKey="clickAddWidgetBtn"/>
7276
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
7377
<waitForElementVisible selector="{{WidgetSection.WidgetType}}" stepKey="waitForWidgetType"/>
7478
<selectOption selector="{{WidgetSection.WidgetType}}" userInput="{{TinyMCEWidgetCMSPageLink.widgetType}}" stepKey="selectCMSPageLinkWidget"/>
@@ -90,6 +94,10 @@
9094
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear5"/>
9195
<waitForElementNotVisible selector="{{WidgetSection.InsertWidget}}" stepKey="waitForInsertWidgetModalToClose"/>
9296
</actionGroup>
97+
<actionGroup name="addPageLinkWidgetToTinyMCEInline" extends="addPageLinkWidgetToTinyMCE">
98+
<waitForElementVisible selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="waitForInsertWidget1"/>
99+
<click selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="clickAddWidgetBtn"/>
100+
</actionGroup>
93101
<actionGroup name="addPageLinkWidgetToTinyMCE3" extends="addPageLinkWidgetToTinyMCE">
94102
<arguments>
95103
<argument name="widget" defaultValue=""/>
@@ -131,8 +139,8 @@
131139
<argument name="title" type="string" defaultValue=""/>
132140
</arguments>
133141
<comment userInput="insertLinkInWYSIWYG" stepKey="comment"/>
134-
<waitForElementVisible selector="{{section.InsertLink}}" stepKey="waitForInsertLinkButton"/>
135-
<click selector="{{section.InsertLink}}" stepKey="clickInsertLinkButton"/>
142+
<waitForElementVisible selector="{{WYSIWYGInline.notCss}} {{section.InsertLink}}" stepKey="waitForInsertLinkButton"/>
143+
<click selector="{{WYSIWYGInline.notCss}} {{section.InsertLink}}" stepKey="clickInsertLinkButton"/>
136144
<waitForPageLoad stepKey="waitForPageLoad"/>
137145
<waitForElementVisible selector="{{WYSIWYGInsertLinkModal.modal}}" stepKey="waitForInsertLinkModal"/>
138146
<fillField selector="{{WYSIWYGInsertLinkModal.urlInput}}" userInput="{{url}}" stepKey="insertUrl"/>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderTextSection.xml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,19 @@
110110
<element name="generalFilter" type="input" selector="input.admin__control-text[name='{{arg1}}']" parameterized="true"/>
111111
</section>
112112
<section name="WYSIWYGOnPageBuilder">
113-
<element name="undo" type="button" selector="div[aria-label='Undo']"/>
114-
<element name="redo" type="button" selector="div[aria-label='Redo']"/>
115-
<element name="fontSize" type="button" selector="div[aria-label='Font Sizes']"/>
116-
<element name="textColor" type="button" selector="div[aria-label='Text color']"/>
117-
<element name="backgroundColor" type="button" selector="div[aria-label='Background color']"/>
118-
<element name="formatSelector" type="button" selector="//span[text()='Formats']"/>
113+
<element name="undo" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Undo']"/>
114+
<element name="redo" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Redo']"/>
115+
<element name="fontSize" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Font Sizes']"/>
116+
<element name="textColor" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Text color']"/>
117+
<element name="backgroundColor" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Background color']"/>
118+
<element name="formatSelector" type="button" selector="//div[contains(@class, 'mce-tinymce') and not(contains(@class, 'mce-tinymce-inline'))]//span[text()='Formats']"/>
119+
</section>
120+
<section name="WYSIWYGOnPageBuilderInline">
121+
<element name="undo" type="button" selector=".mce-tinymce-inline div[aria-label='Undo']"/>
122+
<element name="redo" type="button" selector=".mce-tinymce-inline div[aria-label='Redo']"/>
123+
<element name="fontSize" type="button" selector=".mce-tinymce-inline div[aria-label='Font Sizes']"/>
124+
<element name="textColor" type="button" selector=".mce-tinymce-inline div[aria-label='Text color']"/>
125+
<element name="backgroundColor" type="button" selector=".mce-tinymce-inline div[aria-label='Background color']"/>
126+
<element name="formatSelector" type="button" selector="//div[contains(@class, 'mce-tinymce')]//span[text()='Formats']"/>
119127
</section>
120128
</sections>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="WYSIWYGInline">
12+
<element name="notCss" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline)"/>
13+
</section>
1114
<section name="WYSIWYGInsertLinkModal">
1215
<element name="modal" type="input" selector="[aria-label='Insert link']"/>
1316
<element name="title" type="input" selector="//div[@aria-label='Insert link']//div[contains(@id,'-title') and .='Insert link']"/>

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<actionGroup ref="dragContentTypeToStage" stepKey="dragTextIntoStage">
3838
<argument name="contentType" value="PageBuilderTextContentType"/>
3939
</actionGroup>
40+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
4041
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
4142
<argument name="contentType" value="PageBuilderTextContentType"/>
4243
</actionGroup>
@@ -192,6 +193,7 @@
192193
<argument name="containerTargetIndex" value="1"/>
193194
<argument name="contentTypeIndex" value="1"/>
194195
</actionGroup>
196+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit1"/>
195197
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage1">
196198
<argument name="contentType" value="PageBuilderTextContentType"/>
197199
<argument name="contentTypeIndex" value="1"/>
@@ -211,6 +213,7 @@
211213
<argument name="containerTargetIndex" value="2"/>
212214
<argument name="contentTypeIndex" value="2"/>
213215
</actionGroup>
216+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit2"/>
214217
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage2">
215218
<argument name="contentType" value="PageBuilderTextContentType"/>
216219
<argument name="contentTypeIndex" value="2"/>
@@ -230,6 +233,7 @@
230233
<argument name="containerTargetIndex" value="3"/>
231234
<argument name="contentTypeIndex" value="3"/>
232235
</actionGroup>
236+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit3"/>
233237
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage3">
234238
<argument name="contentType" value="PageBuilderTextContentType"/>
235239
<argument name="contentTypeIndex" value="3"/>
@@ -249,6 +253,7 @@
249253
<argument name="containerTargetIndex" value="4"/>
250254
<argument name="contentTypeIndex" value="4"/>
251255
</actionGroup>
256+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit4"/>
252257
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage4">
253258
<argument name="contentType" value="PageBuilderTextContentType"/>
254259
<argument name="contentTypeIndex" value="4"/>
@@ -859,6 +864,7 @@
859864
<argument name="containerTargetIndex" value="1"/>
860865
<argument name="contentTypeIndex" value="1"/>
861866
</actionGroup>
867+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
862868
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage1">
863869
<argument name="contentType" value="PageBuilderTextContentType"/>
864870
<argument name="contentTypeIndex" value="1"/>
@@ -1329,6 +1335,7 @@
13291335
<argument name="containerTargetIndex" value="1"/>
13301336
<argument name="contentTypeIndex" value="1"/>
13311337
</actionGroup>
1338+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
13321339
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage">
13331340
<argument name="contentType" value="PageBuilderTextContentType"/>
13341341
<argument name="contentTypeIndex" value="1"/>
@@ -1661,6 +1668,7 @@
16611668
<argument name="containerTargetIndex" value="1"/>
16621669
<argument name="contentTypeIndex" value="1"/>
16631670
</actionGroup>
1671+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
16641672
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage1">
16651673
<argument name="contentType" value="PageBuilderTextContentType"/>
16661674
<argument name="contentTypeIndex" value="1"/>
@@ -1828,6 +1836,7 @@
18281836
<argument name="containerTargetIndex" value="1"/>
18291837
<argument name="contentTypeIndex" value="1"/>
18301838
</actionGroup>
1839+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
18311840
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage1">
18321841
<argument name="contentType" value="PageBuilderTextContentType"/>
18331842
<argument name="contentTypeIndex" value="1"/>
@@ -1847,6 +1856,7 @@
18471856
<argument name="containerTargetIndex" value="2"/>
18481857
<argument name="contentTypeIndex" value="2"/>
18491858
</actionGroup>
1859+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit1"/>
18501860
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage2">
18511861
<argument name="contentType" value="PageBuilderTextContentType"/>
18521862
<argument name="contentTypeIndex" value="2"/>
@@ -1866,6 +1876,7 @@
18661876
<argument name="containerTargetIndex" value="3"/>
18671877
<argument name="contentTypeIndex" value="3"/>
18681878
</actionGroup>
1879+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit2"/>
18691880
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage3">
18701881
<argument name="contentType" value="PageBuilderTextContentType"/>
18711882
<argument name="contentTypeIndex" value="3"/>
@@ -1885,6 +1896,7 @@
18851896
<argument name="containerTargetIndex" value="4"/>
18861897
<argument name="contentTypeIndex" value="4"/>
18871898
</actionGroup>
1899+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit4"/>
18881900
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage4">
18891901
<argument name="contentType" value="PageBuilderTextContentType"/>
18901902
<argument name="contentTypeIndex" value="4"/>
@@ -1904,6 +1916,7 @@
19041916
<argument name="containerTargetIndex" value="5"/>
19051917
<argument name="contentTypeIndex" value="5"/>
19061918
</actionGroup>
1919+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit5"/>
19071920
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage5">
19081921
<argument name="contentType" value="PageBuilderTextContentType"/>
19091922
<argument name="contentTypeIndex" value="5"/>
@@ -2055,6 +2068,7 @@
20552068
<argument name="containerTargetIndex" value="1"/>
20562069
<argument name="contentTypeIndex" value="1"/>
20572070
</actionGroup>
2071+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
20582072
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage">
20592073
<argument name="contentType" value="PageBuilderTextContentType"/>
20602074
<argument name="contentTypeIndex" value="1"/>
@@ -2146,6 +2160,7 @@
21462160
<argument name="containerTargetIndex" value="1"/>
21472161
<argument name="contentTypeIndex" value="1"/>
21482162
</actionGroup>
2163+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
21492164
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage1">
21502165
<argument name="contentType" value="PageBuilderTextContentType"/>
21512166
<argument name="contentTypeIndex" value="1"/>
@@ -2165,6 +2180,7 @@
21652180
<argument name="containerTargetIndex" value="2"/>
21662181
<argument name="contentTypeIndex" value="2"/>
21672182
</actionGroup>
2183+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit1"/>
21682184
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage2">
21692185
<argument name="contentType" value="PageBuilderTextContentType"/>
21702186
<argument name="contentTypeIndex" value="2"/>
@@ -2184,6 +2200,7 @@
21842200
<argument name="containerTargetIndex" value="3"/>
21852201
<argument name="contentTypeIndex" value="3"/>
21862202
</actionGroup>
2203+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit2"/>
21872204
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage3">
21882205
<argument name="contentType" value="PageBuilderTextContentType"/>
21892206
<argument name="contentTypeIndex" value="3"/>
@@ -2203,6 +2220,7 @@
22032220
<argument name="containerTargetIndex" value="4"/>
22042221
<argument name="contentTypeIndex" value="4"/>
22052222
</actionGroup>
2223+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit3"/>
22062224
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage4">
22072225
<argument name="contentType" value="PageBuilderTextContentType"/>
22082226
<argument name="contentTypeIndex" value="4"/>
@@ -2222,6 +2240,7 @@
22222240
<argument name="containerTargetIndex" value="5"/>
22232241
<argument name="contentTypeIndex" value="5"/>
22242242
</actionGroup>
2243+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit4"/>
22252244
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage5">
22262245
<argument name="contentType" value="PageBuilderTextContentType"/>
22272246
<argument name="contentTypeIndex" value="5"/>
@@ -2373,6 +2392,7 @@
23732392
<argument name="containerTargetIndex" value="1"/>
23742393
<argument name="contentTypeIndex" value="1"/>
23752394
</actionGroup>
2395+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
23762396
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage">
23772397
<argument name="contentType" value="PageBuilderTextContentType"/>
23782398
<argument name="contentTypeIndex" value="1"/>
@@ -2447,6 +2467,7 @@
24472467
<argument name="containerTargetIndex" value="1"/>
24482468
<argument name="contentTypeIndex" value="1"/>
24492469
</actionGroup>
2470+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
24502471
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage">
24512472
<argument name="contentType" value="PageBuilderTextContentType"/>
24522473
<argument name="contentTypeIndex" value="1"/>
@@ -2559,6 +2580,7 @@
25592580
<argument name="containerTargetIndex" value="1"/>
25602581
<argument name="contentTypeIndex" value="1"/>
25612582
</actionGroup>
2583+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
25622584
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage">
25632585
<argument name="contentType" value="PageBuilderTextContentType"/>
25642586
<argument name="contentTypeIndex" value="1"/>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<actionGroup ref="dragContentTypeToStage" stepKey="dragTextIntoStage">
4545
<argument name="contentType" value="PageBuilderTextContentType"/>
4646
</actionGroup>
47+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
4748
<actionGroup ref="dragContentTypeToStage" stepKey="dragHeaderIntoStage">
4849
<argument name="contentType" value="PageBuilderHeadingContentType"/>
4950
</actionGroup>
@@ -1424,6 +1425,7 @@
14241425
<actionGroup ref="dragContentTypeToStage" stepKey="dragButtonsOntoStage">
14251426
<argument name="contentType" value="PageBuilderTextContentType"/>
14261427
</actionGroup>
1428+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
14271429
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
14281430
<argument name="contentType" value="PageBuilderTextContentType"/>
14291431
</actionGroup>
@@ -1540,6 +1542,7 @@
15401542
<actionGroup ref="dragContentTypeToStage" stepKey="dragButtonsOntoStage">
15411543
<argument name="contentType" value="PageBuilderTextContentType"/>
15421544
</actionGroup>
1545+
<actionGroup ref="clickOutsideTextInlineEditing" stepKey="closeLiveEdit"/>
15431546
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
15441547
<argument name="contentType" value="PageBuilderTextContentType"/>
15451548
</actionGroup>

0 commit comments

Comments
 (0)