Skip to content

Commit c1127cd

Browse files
committed
Merge branch 'cms-team-1-delivery' of github.com:magento-obsessive-owls/magento2-page-builder into cms-team-1-delivery
2 parents ea18699 + c25b851 commit c1127cd

25 files changed

+350
-232
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,17 @@
3636
<fillField selector="{{CmsNewPagePageActionsSection.pageTitle}}" userInput="{{contentType.name}}{{PageBuilderPageTitle.pageName}}" stepKey="enterPageTitle"/>
3737
</actionGroup>
3838
<actionGroup name="switchToPageBuilderStage">
39-
<waitForElementVisible time="30" selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForElementVisible"/>
40-
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContent"/>
39+
<arguments>
40+
<argument name="sectionSelector" defaultValue="{{CmsNewPagePageContentSection.header}}" type="string"/>
41+
<argument name="sectionDependentSelector" defaultValue="{{CmsNewPagePageContentSection.header}}._show" type="string"/>
42+
<argument name="rowIndex" defaultValue="1" type="string"/>
43+
</arguments>
44+
<waitForElementVisible time="30" selector="{{sectionSelector}}" stepKey="waitForSection"/>
45+
<conditionalClick selector="{{sectionSelector}}" dependentSelector="{{sectionDependentSelector}}" visible="false" stepKey="expandSection"/>
4146
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
4247
<!-- Wait for the first row to be added into the stage for it to be "ready" -->
4348
<waitForElementNotVisible selector="{{PageBuilderStage.stageLoading}}" stepKey="waitForStageLoadingGraphicNotVisible"/>
44-
<waitForElementVisible time="30" selector="{{RowOnStage.base('1')}}" stepKey="waitForPageBuilderRow"/>
49+
<waitForElementVisible time="30" selector="{{RowOnStage.base(rowIndex)}}" stepKey="waitForPageBuilderRow"/>
4550
</actionGroup>
4651
<actionGroup name="saveAndContinueEditCmsPage">
4752
<waitForElementVisible time="10" selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForSaveAndContinueVisibility"/>

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

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,6 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="addButton">
12-
<arguments>
13-
<argument name="buttonGroupIndex" defaultValue="1" type="string"/>
14-
</arguments>
15-
<comment userInput="Adding Button" stepKey="comment"/>
16-
<executeJS function="return Math.round(document.getElementsByClassName('pagebuilder-button-item').length+1)" stepKey="initialNumberOfButtonsPlusOne"/>
17-
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unfocusButtonLiveEdit1"/>
18-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStageByIndex(PageBuilderButtonsContentType.role, buttonGroupIndex)}}" stepKey="mouseOverButtonsGroup"/>
19-
<waitForPageLoad stepKey="waitForPageLoad"/>
20-
<waitForElementVisible time="10" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(PageBuilderButtonsContentType.role)}}" stepKey="waitForOptionsMenu"/>
21-
<waitForElementVisible time="10" selector="{{ButtonGroupOnStage.addNewButtonItemOption(buttonGroupIndex)}}" stepKey="seeAddButton"/>
22-
<click selector="{{ButtonGroupOnStage.addNewButtonItemOption(buttonGroupIndex)}}" stepKey="clickAddButton"/>
23-
<waitForPageLoad stepKey="waitForPageLoad2"/>
24-
<executeJS function="return document.getElementsByClassName('pagebuilder-button-item').length" stepKey="numberOfButtonsAfterAdd"/>
25-
<assertEquals stepKey="assertOneMoreButton">
26-
<expectedResult type="variable">initialNumberOfButtonsPlusOne</expectedResult>
27-
<actualResult type="variable">numberOfButtonsAfterAdd</actualResult>
28-
</assertEquals>
29-
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unfocusButtonLiveEdit2"/>
30-
</actionGroup>
3111
<actionGroup name="validateButtonItemContent">
3212
<arguments>
3313
<argument name="page"/>
@@ -48,14 +28,15 @@
4828
<arguments>
4929
<argument name="text"/>
5030
<argument name="index" defaultValue="1" type="string"/>
31+
<argument name="pageBuilderArea" defaultValue="" type="string"/>
5132
</arguments>
5233
<comment userInput="inlineEditButton" stepKey="comment"/>
5334
<waitForElementVisible selector="{{ButtonItemOnStage.base(index)}}" stepKey="waitForButton"/>
5435
<waitForElementVisible selector="{{ButtonItemOnStage.editableButtonItemElement(index)}}" stepKey="waitForButtonEditable"/>
5536
<fillField selector="{{ButtonItemOnStage.editableButtonItemElement(index)}}" userInput="{{text.value}}" stepKey="enterButtonText"/>
5637
<waitForPageLoad stepKey="waitForPageLoad"/>
5738
<seeElement selector="{{ButtonItemOnStage.buttonItemText(index, text.value)}}" stepKey="seeButtonText"/>
58-
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusLiveEdit"/>
39+
<click selector="{{pageBuilderArea}}{{PageBuilderPanel.searchPanel}}" stepKey="unFocusLiveEdit"/>
5940
<waitForPageLoad stepKey="waitForUnFocus"/>
6041
</actionGroup>
6142
<actionGroup name="moveButton">

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

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

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="addSlide">
12-
<arguments>
13-
<argument name="slideGroupIndex" defaultValue="1" type="string"/>
14-
</arguments>
15-
<comment userInput="Adding Slide" stepKey="comment"/>
16-
<executeJS function="return document.getElementsByClassName('pagebuilder-slide').length+1" stepKey="initialNumberOfSlidesPlusOne"/>
17-
<scrollTo selector="{{PageBuilderPanel.searchPanel}}" x="0" y="-150" stepKey="scrollToSearchPanel"/>
18-
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusSlide"/>
19-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStageByIndex(PageBuilderSliderContentType.role, slideGroupIndex)}}" stepKey="mouseOverSlider"/>
20-
<waitForPageLoad stepKey="waitForPageLoad1"/>
21-
<waitForElementVisible selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(PageBuilderSliderContentType.role)}}" stepKey="waitForOptionsMenu"/>
22-
<waitForElementVisible selector="{{PageBuilderContentTypeOptionsMenu.contentTypeAdd(PageBuilderSliderContentType.role)}}" stepKey="waitForAddSlideButton"/>
23-
<click selector="{{PageBuilderContentTypeOptionsMenu.contentTypeAdd(PageBuilderSliderContentType.role)}}" stepKey="clickAddSlideButton"/>
24-
<waitForPageLoad stepKey="waitForPageLoad2"/>
25-
<executeJS function="return document.getElementsByClassName('pagebuilder-slide').length" stepKey="numberOfSlidesAfterAdd"/>
26-
<assertEquals stepKey="assertOneMoreSlide">
27-
<expectedResult type="variable">initialNumberOfSlidesPlusOne</expectedResult>
28-
<actualResult type="variable">numberOfSlidesAfterAdd</actualResult>
29-
</assertEquals>
30-
</actionGroup>
3111
<actionGroup name="switchSlide">
3212
<arguments>
3313
<argument name="section" defaultValue="SliderOnFrontend"/>

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

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

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="addTab">
12-
<arguments>
13-
<argument name="x" defaultValue="10" type="string"/>
14-
<argument name="y" defaultValue="0" type="string"/>
15-
</arguments>
16-
<click selector="{{TabsOnStage.tabsContainer}}" stepKey="focusOnContentType"/>
17-
<waitForElementVisible time="10" selector="{{PageBuilderStage.contentTypeInStage(PageBuilderTabsContentType.role)}}" stepKey="waitForContentTypeInStageVisible" />
18-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(PageBuilderTabsContentType.role)}}" x="{{x}}" y="{{y}}" stepKey="onMouseOverContentTypeStage"/>
19-
<waitForPageLoad stepKey="waitForMouseOverAnimation" />
20-
<waitForElementVisible time="10" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(PageBuilderTabsContentType.role)}}" stepKey="waitForOptions" />
21-
<click selector="{{PageBuilderContentTypeOptionsMenu.contentTypeAdd(PageBuilderTabsContentType.role)}}" stepKey="clickAddContentType"/>
22-
<waitForPageLoad stepKey="waitForNewTab" time="30"/>
23-
</actionGroup>
24-
<actionGroup name="addTabAndOpenNewTabOptions">
25-
<arguments>
26-
<argument name="from" defaultValue="1" type="string"/>
27-
<argument name="to" defaultValue="2" type="string"/>
28-
<argument name="x" defaultValue="10" type="string"/>
29-
<argument name="y" defaultValue="0" type="string"/>
30-
</arguments>
31-
<click selector="{{TabsOnStage.tabsContainer}}" stepKey="focusOnContentType"/>
32-
<waitForElementVisible time="10" selector="{{PageBuilderStage.contentTypeInStage(PageBuilderTabsContentType.role)}}" stepKey="waitForContentTypeInStageVisible" />
33-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(PageBuilderTabsContentType.role)}}" x="{{x}}" y="{{y}}" stepKey="onMouseOverContentTypeStage"/>
34-
<waitForPageLoad stepKey="waitForMouseOverAnimation" time="30"/>
35-
<waitForElementVisible time="10" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(PageBuilderTabsContentType.role)}}" stepKey="waitForOptions" />
36-
<click selector="{{PageBuilderContentTypeOptionsMenu.contentTypeAdd(PageBuilderTabsContentType.role)}}" stepKey="clickAddContentType"/>
37-
<waitForPageLoad stepKey="waitForNewTab" time="30"/>
38-
<waitForElementVisible selector="{{TabOnStage.tabContent(to)}}" stepKey="waitForNewTabContent"/>
39-
<waitForElementVisible selector="{{TabOnStage.tabHeader(to)}}" stepKey="waitForNewTabHeader"/>
40-
<waitForElementVisible selector="{{TabOnStage.optionsMenu(to)}}" stepKey="waitForTabOptionsPanel"/>
41-
<waitForElementVisible selector="{{TabOnStage.optionsMenuButton(to, 'edit')}}" stepKey="seeTabOptionsEdit2"/>
42-
<click selector="{{TabOnStage.optionsMenuButton(to, 'edit')}}" stepKey="clickEditContentType2"/>
43-
<waitForElementVisible time="5" selector="{{EditPanelForm.editForm}}" stepKey="waitForEditForm" />
44-
<!-- Required time wait due to animation -->
45-
<waitForPageLoad stepKey="waitForAnimation" time="30"/>
46-
<see userInput="Edit Tab" selector="{{EditPanelForm.editFormTitle}}" stepKey="seeContentTypeNameInEditFormTitle"/>
47-
</actionGroup>
4811
<actionGroup name="switchTabs">
4912
<arguments>
5013
<argument name="section"/>

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

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,27 @@
1111
<actionGroup name="dragContentTypeToStage">
1212
<arguments>
1313
<argument name="contentType"/>
14+
<argument name="containerTargetType" defaultValue="PageBuilderRowContentType"/>
15+
<argument name="containerTargetIndex" defaultValue="1" type="string"/>
1416
</arguments>
1517
<waitForElementVisible time="30" selector="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" stepKey="waitForContentTypeInPanel"/>
16-
<dragAndDrop selector1="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderStage.dropAreaInStage}}" stepKey="dropContentTypeIntoStage"/>
17-
<waitForPageLoad stepKey="waitForContentTypeToLoad" time="30"/>
18+
<dragAndDrop selector1="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderStage.contentTypeContainer(containerTargetType.role, containerTargetIndex)}}" stepKey="dropContentTypeIntoStage"/>
19+
<waitForPageLoad stepKey="waitForAnimation" time="30"/>
1820
<dontSeeJsError stepKey="doNotSeeJSErrorInConsole"/>
19-
<waitForLoadingMaskToDisappear stepKey="waitForAnimation" />
2021
<waitForElementVisible time="10" selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}" stepKey="waitForContentTypeInStage" />
21-
<waitForPageLoad stepKey="waitForToolbarsToLoad" time="30"/>
2222
</actionGroup>
2323
<actionGroup name="dragContentTypeToStageByIndex">
2424
<arguments>
2525
<argument name="contentType"/>
2626
<argument name="contentTypeNumber" defaultValue="1" type="string"/>
27+
<argument name="containerTargetType" defaultValue="PageBuilderRowContentType"/>
28+
<argument name="containerTargetIndex" defaultValue="1" type="string"/>
2729
</arguments>
28-
<dragAndDrop selector1="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderStage.dropAreaInStage}}" stepKey="dropContentTypeIntoStage"/>
30+
<waitForElementVisible time="30" selector="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" stepKey="waitForContentTypeInPanel"/>
31+
<dragAndDrop selector1="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderStage.contentTypeContainer(containerTargetType.role, containerTargetIndex)}}" stepKey="dropContentTypeIntoStage"/>
2932
<waitForPageLoad stepKey="waitForAnimation" time="30"/>
3033
<dontSeeJsError stepKey="doNotSeeJSErrorInConsole"/>
3134
<waitForElementVisible time="10" selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeNumber)}}" stepKey="waitForContentTypeInStage" />
32-
<waitForPageLoad stepKey="waitForToolbarsToLoad" time="30"/>
3335
</actionGroup>
3436
<actionGroup name="dragContentTypeToContainer">
3537
<arguments>
@@ -39,10 +41,11 @@
3941
<argument name="containerTargetIndex" defaultValue="1" type="string"/>
4042
<argument name="offsetXCoordinate" defaultValue="null" type="string"/>
4143
<argument name="offsetYCoordinate" defaultValue="null" type="string"/>
44+
<argument name="pageBuilderArea" defaultValue="" type="string"/>
4245
</arguments>
43-
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="lostFocus"/>
44-
<waitForElementVisible time="30" selector="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" stepKey="waitForContentTypeInPanel"/>
45-
<dragAndDrop selector1="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderStage.contentTypeContainer(containerTargetType.role, containerTargetIndex)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="dropContentTypeIntoStage"/>
46+
<click selector="{{pageBuilderArea}}{{PageBuilderPanel.searchPanel}}" stepKey="lostFocus"/>
47+
<waitForElementVisible time="30" selector="{{pageBuilderArea}}{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" stepKey="waitForContentTypeInPanel"/>
48+
<dragAndDrop selector1="{{pageBuilderArea}}{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderStage.contentTypeContainer(containerTargetType.role, containerTargetIndex)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="dropContentTypeIntoStage"/>
4649
<waitForPageLoad stepKey="waitForAnimation" time="30"/>
4750
<dontSeeJsError stepKey="doNotSeeJSErrorInConsole"/>
4851
<waitForElementVisible time="10" selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeInStage" />
@@ -89,10 +92,11 @@
8992
<argument name="dropZoneIndex" defaultValue="1" type="string"/>
9093
<argument name="offsetXCoordinate" defaultValue="null" type="string"/>
9194
<argument name="offsetYCoordinate" defaultValue="null" type="string"/>
95+
<argument name="pageBuilderArea" defaultValue="" type="string"/>
9296
</arguments>
93-
<scrollTo selector="{{CmsNewPagePageActionsSection.contentSectionName}}" stepKey="scrollToTopOfStage"/>
94-
<waitForElement time="30" selector="{{PageBuilderStage.dropZone(containerTargetType.role, containerTargetIndex, dropZoneIndex)}}" stepKey="waitForStageActive"/>
95-
<dragAndDrop selector1="{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderStage.dropZone(containerTargetType.role, containerTargetIndex, dropZoneIndex)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="dropContentTypeIntoStage"/>
97+
<click selector="{{pageBuilderArea}}{{PageBuilderPanel.searchPanel}}" stepKey="loseFocus"/>
98+
<waitForElementVisible time="30" selector="{{pageBuilderArea}}{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" stepKey="waitForContentTypeInPanel"/>
99+
<dragAndDrop selector1="{{pageBuilderArea}}{{PageBuilderPanel.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderStage.dropZone(containerTargetType.role, containerTargetIndex, dropZoneIndex)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="dropContentTypeIntoStage"/>
96100
<waitForPageLoad time="30" stepKey="waitForAnimation"/>
97101
<dontSeeJsError stepKey="doNotSeeJSErrorInConsole"/>
98102
<waitForElementVisible time="30" selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeInStage"/>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@
1616
<waitForElementVisible time="1" selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForCmsPageSaveButton"/>
1717
</actionGroup>
1818
<actionGroup name="saveEditPanelSettings">
19+
<arguments>
20+
<argument name="baseContent" defaultValue="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" type="string"/>
21+
</arguments>
1922
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
2023
<waitForElementVisible time="5" selector="{{EditPanelForm.editFormSave}}" stepKey="waitForSaveButton"/>
2124
<click selector="{{EditPanelForm.editFormSave}}" stepKey="clickSaveButton"/>
2225
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
2326
<waitForElementNotVisible time="5" selector="{{EditPanelForm.editForm}}" stepKey="waitForEditFormNotVisible"/>
24-
<waitForElementVisible time="10" selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForCmsPageSaveButton"/>
27+
<waitForElementVisible time="10" selector="{{baseContent}}" stepKey="waitForCmsPageSaveButton"/>
2528
</actionGroup>
2629
<actionGroup name="saveEditPanelAndValidateFieldError">
2730
<arguments>

0 commit comments

Comments
 (0)