Skip to content

Commit 7f076f9

Browse files
committed
Merge branch 'MC-4129-disable-edit-panel-auto-open' of github.com:magento-obsessive-owls/magento2-page-builder into cms-team-1-delivery
# Conflicts: # app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderProductsTest.xml # app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderSliderCommonTests.xml
2 parents db5fead + f505491 commit 7f076f9

31 files changed

+595
-420
lines changed

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,6 @@
2828
<waitForElementVisible time="10" selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeNumber)}}" stepKey="waitForContentTypeInStage" />
2929
<waitForPageLoad stepKey="waitForToolbarsToLoad" time="30"/>
3030
</actionGroup>
31-
<actionGroup name="dragContentTypeToStageAndExpectEditPanel">
32-
<arguments>
33-
<argument name="contentType"/>
34-
</arguments>
35-
<dragAndDrop selector1="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderStage.dropAreaInStage}}" stepKey="dropContentTypeIntoStage"/>
36-
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
37-
<waitForElementVisible time="10" selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}" stepKey="waitForContentTypeInStage" />
38-
<waitForElementVisible time="10" selector="{{EditPanelForm.editFormTitle}}" stepKey="waitForContentTypeNameInEditFormTitle" />
39-
<see userInput="Edit {{contentType.editPanelName}}" selector="{{EditPanelForm.editFormTitle}}" stepKey="seeContentTypeNameInEditFormTitle"/>
40-
<waitForPageLoad stepKey="waitForEditFormLoad" time="30"/>
41-
</actionGroup>
4231
<actionGroup name="dragContentTypeToContainer">
4332
<arguments>
4433
<argument name="contentType"/>
@@ -71,20 +60,6 @@
7160
<waitForElementNotVisible time="10" selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeNotOnStage" />
7261
<dontSeeElementInDOM selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="dontSeeElementInContainer" />
7362
</actionGroup>
74-
<actionGroup name="dragContentTypeToContainerAndExpectEditPanel">
75-
<arguments>
76-
<argument name="contentType"/>
77-
<argument name="contentTypeIndex" defaultValue="1" type="string"/>
78-
<argument name="containerTargetType"/>
79-
<argument name="containerTargetIndex" defaultValue="1" type="string"/>
80-
</arguments>
81-
<scrollTo selector="{{CmsNewPagePageActionsSection.contentSectionName}}" stepKey="scrollToTopOfStage"/>
82-
<dragAndDrop selector1="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderStage.contentTypeContainer(containerTargetType.role, containerTargetIndex)}}" stepKey="dropContentTypeIntoStage"/>
83-
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
84-
<waitForElementVisible time="30" selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeInContainer"/>
85-
<waitForElementVisible time="30" selector="{{EditPanelForm.editFormTitle}}" stepKey="waitForContentTypeNameInEditFormTitle"/>
86-
<see userInput="Edit {{contentType.editPanelName}}" selector="{{EditPanelForm.editFormTitle}}" stepKey="seeContentTypeNameInEditFormTitle"/>
87-
</actionGroup>
8863
<!-- Test to ensure a content block doesn't receive drop events -->
8964
<actionGroup name="dragContentTypeToContentType">
9065
<arguments>

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

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
4040
<argument name="contentType" value="PageBuilderBlockContentType"/>
4141
</actionGroup>
42-
<actionGroup ref="closeEditPanelSettings" stepKey="closeSlideEditPanel"/>
4342
<waitForElementVisible selector="{{BlockOnStage.status('1', 'Empty Block')}}" stepKey="seeEmptyBlockPlaceHolder"/>
4443
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
4544
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
@@ -79,7 +78,9 @@
7978
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
8079
<argument name="contentType" value="PageBuilderBlockContentType"/>
8180
</actionGroup>
82-
<waitForElementVisible selector="{{BlockOnForm.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/>
81+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
82+
<argument name="contentType" value="PageBuilderBlockContentType"/>
83+
</actionGroup>
8384
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
8485
<argument name="block" value="$$createPreReqBlock$$"/>
8586
</actionGroup>
@@ -133,7 +134,9 @@
133134
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
134135
<argument name="contentType" value="PageBuilderBlockContentType"/>
135136
</actionGroup>
136-
<waitForElementVisible selector="{{BlockOnForm.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/>
137+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
138+
<argument name="contentType" value="PageBuilderBlockContentType"/>
139+
</actionGroup>
137140
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
138141
<argument name="block" value="$$createPreReqBlock$$"/>
139142
</actionGroup>
@@ -208,10 +211,12 @@
208211
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupAddContent">
209212
<argument name="group" value="PageBuilderBlockContentType"/>
210213
</actionGroup>
211-
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragBlockIntoStage">
214+
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
215+
<argument name="contentType" value="PageBuilderBlockContentType"/>
216+
</actionGroup>
217+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
212218
<argument name="contentType" value="PageBuilderBlockContentType"/>
213219
</actionGroup>
214-
<waitForElementVisible selector="{{BlockOnForm.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/>
215220
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
216221
<argument name="block" value="$$createPreReqBlock$$"/>
217222
</actionGroup>
@@ -272,6 +277,9 @@
272277
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
273278
<argument name="contentType" value="PageBuilderBlockContentType"/>
274279
</actionGroup>
280+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
281+
<argument name="contentType" value="PageBuilderBlockContentType"/>
282+
</actionGroup>
275283
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
276284
<argument name="block" value="$$createPreReqBlock$$"/>
277285
</actionGroup>
@@ -349,10 +357,9 @@
349357
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupAddContent">
350358
<argument name="group" value="PageBuilderBlockContentType"/>
351359
</actionGroup>
352-
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragBlockIntoStage">
360+
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
353361
<argument name="contentType" value="PageBuilderBlockContentType"/>
354362
</actionGroup>
355-
<actionGroup ref="closeEditPanelSettings" stepKey="closeEditPanelSettings2"/>
356363
<actionGroup ref="removeEmptyContentTypeFromStage" stepKey="removeEmptyContentTypeFromStage">
357364
<argument name="contentType" value="PageBuilderBlockContentType"/>
358365
</actionGroup>
@@ -388,6 +395,9 @@
388395
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
389396
<argument name="contentType" value="PageBuilderBlockContentType"/>
390397
</actionGroup>
398+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
399+
<argument name="contentType" value="PageBuilderBlockContentType"/>
400+
</actionGroup>
391401
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
392402
<argument name="block" value="$createPreReqBlock$"/>
393403
</actionGroup>
@@ -433,7 +443,10 @@
433443
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupAddContent">
434444
<argument name="group" value="PageBuilderBlockContentType"/>
435445
</actionGroup>
436-
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragBlockIntoStage">
446+
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
447+
<argument name="contentType" value="PageBuilderBlockContentType"/>
448+
</actionGroup>
449+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
437450
<argument name="contentType" value="PageBuilderBlockContentType"/>
438451
</actionGroup>
439452
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
@@ -564,7 +577,10 @@
564577
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
565578
<argument name="group" value="PageBuilderBlockContentType"/>
566579
</actionGroup>
567-
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragBlockIntoStage">
580+
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
581+
<argument name="contentType" value="PageBuilderBlockContentType"/>
582+
</actionGroup>
583+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
568584
<argument name="contentType" value="PageBuilderBlockContentType"/>
569585
</actionGroup>
570586
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
@@ -767,12 +783,11 @@
767783
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupAddContent">
768784
<argument name="group" value="PageBuilderBlockContentType"/>
769785
</actionGroup>
770-
<actionGroup ref="dragContentTypeToContainerAndExpectEditPanel" stepKey="dragBlockOntoColumn">
786+
<actionGroup ref="dragContentTypeToContainer" stepKey="dragBlockOntoColumn">
771787
<argument name="contentType" value="PageBuilderBlockContentType"/>
772788
<argument name="containerTargetType" value="PageBuilderColumnContentType"/>
773789
<argument name="containerTargetIndex" value="2" />
774790
</actionGroup>
775-
<actionGroup ref="closeEditPanelSettings" stepKey="closeEditPanel"/>
776791
<!-- Validate Stage -->
777792
<comment userInput="User sees Block displayed in column on Stage" stepKey="confirmBlockOnStage"/>
778793
<actionGroup ref="validateContentTypeInsideContainerStage" stepKey="checkContentTypeInContainerStage">
@@ -875,7 +890,9 @@
875890
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
876891
<argument name="contentType" value="PageBuilderBlockContentType"/>
877892
</actionGroup>
878-
<waitForElementVisible selector="{{BlockOnForm.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/>
893+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
894+
<argument name="contentType" value="PageBuilderBlockContentType"/>
895+
</actionGroup>
879896
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
880897
<argument name="block" value="$$createPreReqBlock$$"/>
881898
</actionGroup>
@@ -947,7 +964,9 @@
947964
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
948965
<argument name="contentType" value="PageBuilderBlockContentType"/>
949966
</actionGroup>
950-
<waitForElementVisible selector="{{BlockOnForm.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/>
967+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
968+
<argument name="contentType" value="PageBuilderBlockContentType"/>
969+
</actionGroup>
951970
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
952971
<argument name="block" value="$$createPreReqBlock$$"/>
953972
</actionGroup>
@@ -1009,6 +1028,9 @@
10091028
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
10101029
<argument name="contentType" value="PageBuilderBlockContentType"/>
10111030
</actionGroup>
1031+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
1032+
<argument name="contentType" value="PageBuilderBlockContentType"/>
1033+
</actionGroup>
10121034
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
10131035
<argument name="block" value="$$createPreReqBlock$$"/>
10141036
</actionGroup>
@@ -1063,7 +1085,9 @@
10631085
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
10641086
<argument name="contentType" value="PageBuilderBlockContentType"/>
10651087
</actionGroup>
1066-
<waitForElementVisible selector="{{BlockOnForm.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/>
1088+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop">
1089+
<argument name="contentType" value="PageBuilderBlockContentType"/>
1090+
</actionGroup>
10671091
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
10681092
<argument name="block" value="$$createPreReqBlock$$"/>
10691093
</actionGroup>

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,9 @@
226226
</actionGroup>
227227
<!-- Validate Video Box Shadow -->
228228
<comment userInput="Validate Video Box-Shadow" stepKey="commentValidateVideoBoxShadow"/>
229-
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragVideoIntoStage">
229+
<actionGroup ref="dragContentTypeToStage" stepKey="dragVideoIntoStage">
230230
<argument name="contentType" value="PageBuilderVideoContentType"/>
231231
</actionGroup>
232-
<actionGroup ref="closeEditPanelSettings" stepKey="closeVideoEditPanelSettings"/>
233232
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="resetMouseOverVideo"/>
234233
<executeJS function="return window.getComputedStyle(document.querySelector('.pagebuilder-video'),null).getPropertyValue('box-shadow')" stepKey="getDefaultVideoBoxShadowStyle"/>
235234
<assertEquals stepKey="assertDefaultVideoBoxShadowStyle" message="pass">
@@ -269,10 +268,9 @@
269268
</actionGroup>
270269
<!-- Validate Slider Box Shadow -->
271270
<comment userInput="Validate Slider Box-Shadow" stepKey="commentValidateSliderBoxShadow"/>
272-
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragSliderIntoStage">
271+
<actionGroup ref="dragContentTypeToStage" stepKey="dragSliderIntoStage">
273272
<argument name="contentType" value="PageBuilderSliderContentType"/>
274273
</actionGroup>
275-
<actionGroup ref="closeEditPanelSettings" stepKey="closeSliderEditPanelSettings"/>
276274
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="resetMouseOverSlider"/>
277275
<executeJS function="return window.getComputedStyle(document.querySelector('.pagebuilder-slider .slider-container'),null).getPropertyValue('box-shadow')" stepKey="getDefaultSliderBoxShadowStyle"/>
278276
<assertEquals stepKey="assertDefaultSliderBoxShadowStyle" message="pass">
@@ -291,10 +289,9 @@
291289
</actionGroup>
292290
<!-- Validate Map Box Shadow -->
293291
<comment userInput="Validate Map Box-Shadow" stepKey="commentValidateMapBoxShadow"/>
294-
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragMapIntoStage">
292+
<actionGroup ref="dragContentTypeToStage" stepKey="dragMapIntoStage">
295293
<argument name="contentType" value="PageBuilderMapContentType"/>
296294
</actionGroup>
297-
<actionGroup ref="closeEditPanelSettings" stepKey="closeMapEditPanelSettings"/>
298295
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="resetMouseOverMap"/>
299296
<executeJS function="return window.getComputedStyle(document.querySelector('.pagebuilder-map'),null).getPropertyValue('box-shadow')" stepKey="getDefaultMapBoxShadowStyle"/>
300297
<assertEquals stepKey="assertDefaultMapBoxShadowStyle" message="pass">
@@ -316,10 +313,9 @@
316313
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroupAddContent">
317314
<argument name="group" value="PageBuilderBlockContentType"/>
318315
</actionGroup>
319-
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragBlockIntoStage">
316+
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
320317
<argument name="contentType" value="PageBuilderBlockContentType"/>
321318
</actionGroup>
322-
<actionGroup ref="closeEditPanelSettings" stepKey="closeBlockEditPanelSettings"/>
323319
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="resetMouseOverBlock"/>
324320
<executeJS function="return window.getComputedStyle(document.querySelector('.pagebuilder-block'),null).getPropertyValue('box-shadow')" stepKey="getDefaultBlockBoxShadowStyle"/>
325321
<assertEquals stepKey="assertDefaultBlockBoxShadowStyle" message="pass">
@@ -338,10 +334,9 @@
338334
</actionGroup>
339335
<!-- Validate Products Box Shadow -->
340336
<comment userInput="Validate Products Box-Shadow" stepKey="commentValidateProductsBoxShadow"/>
341-
<actionGroup ref="dragContentTypeToStageAndExpectEditPanel" stepKey="dragProductIntoStage">
337+
<actionGroup ref="dragContentTypeToStage" stepKey="dragProductIntoStage">
342338
<argument name="contentType" value="PageBuilderProductsContentType"/>
343339
</actionGroup>
344-
<actionGroup ref="closeEditPanelSettings" stepKey="closeProductsEditPanelSettings"/>
345340
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="resetMouseOverProducts"/>
346341
<executeJS function="return window.getComputedStyle(document.querySelector('.pagebuilder-products'),null).getPropertyValue('box-shadow')" stepKey="getDefaultProductsBoxShadowStyle"/>
347342
<assertEquals stepKey="assertDefaultProductsBoxShadowStyle" message="pass">

0 commit comments

Comments
 (0)