Skip to content

Commit c86053f

Browse files
#429: User can add content to the Stage directly
- fix test after code review
1 parent 7c35ce7 commit c86053f

File tree

883 files changed

+1002
-978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

883 files changed

+1002
-978
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<waitForElementVisible time="30" selector="{{editButtonSelector}}" stepKey="waitForEditButton"/>
2323
<click selector="{{editButtonSelector}}" stepKey="clickEditButton"/>
2424
<waitForPageLoad stepKey="waitForFullScreenAnimation"/>
25-
<!-- Wait for the first row to be added into the stage for it to be "ready" -->
2625
<waitForElementNotVisible selector="{{PageBuilderStage.stageLoading}}" stepKey="waitForStageLoadingGraphicNotVisible"/>
2726
<waitForElementVisible time="30" selector="{{PageBuilderStage.rootContainer(rowIndex)}}" stepKey="waitForPageBuilderRow"/>
2827
</actionGroup>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/OptionsMenuActionGroup/RemoveContentTypeFromStageActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
<click selector="{{PageBuilderStage.modalOk}}" stepKey="confirmRemoveModal"/>
2626
<waitForPageLoad time="30" stepKey="waitForRemoveAnimation"/>
2727
<waitForElementNotVisible time="30" selector="{{PageBuilderStage.modalOk}}" stepKey="waitForModalHide"/>
28-
<waitForElementVisible time="30" selector="{{PageBuilderStage.rootContainer('1')}}" stepKey="waitForPageBuilderRow"/>
28+
<comment userInput="removing deprecated element" stepKey="waitForPageBuilderRow"/>
29+
<waitForElementVisible time="30" selector="{{PageBuilderStage.rootContainer('1')}}" stepKey="waitForPageBuilderRootContainer"/>
2930
<!-- Follow with confirmRemovalModal actionGroup -->
3031
</actionGroup>
3132
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminVerifyEmptyStage">
11+
<annotations>
12+
<description>Verifies that the Page Builder stage only has root container.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="rotContainerIndex" defaultValue="1" type="string"/>
16+
<argument name="pageBuilderArea" defaultValue="" type="string"/>
17+
</arguments>
18+
<waitForPageLoad stepKey="waitForStageLoad"/>
19+
<waitForElementVisible selector="{{PageBuilderStage.rootContainer(rotContainerIndex)}}" stepKey="waitForEmptyRootContainer"/>
20+
<seeElement selector="{{PageBuilderStage.rootContainer(rotContainerIndex)}}" stepKey="seeEmptyRootContainer"/>
21+
<see userInput="Drag Row, Columns, Tabs, Block, Dynamic Block or HTML Code here" selector="{{PageBuilderStage.rootContainerPlaceholder(rotContainerIndex)}}" stepKey="seeEmptyRootContainerPlaceholderMessage"/>
22+
<seeNumberOfElements userInput="0" selector="{{pageBuilderArea}}{{RowOnStage.allRows}}" stepKey="seeZeroRow"/>
23+
</actionGroup>
24+
</actionGroups>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="verifyEmptyStage">
10+
<actionGroup name="verifyEmptyStage" deprecated="Use AdminVerifyEmptyStage">
1111
<annotations>
12-
<description>Verifies that the Page Builder stage only has root container.</description>
12+
<description>Verifies that the Page Builder stage only has 1 row that is empty.</description>
1313
</annotations>
1414
<arguments>
1515
<argument name="rowIndex" defaultValue="1" type="string"/>
1616
<argument name="pageBuilderArea" defaultValue="" type="string"/>
1717
</arguments>
1818
<waitForPageLoad stepKey="waitForStageLoad"/>
19-
<waitForElementVisible selector="{{PageBuilderStage.rootContainer(rowIndex)}}" stepKey="waitForEmptyRow"/>
20-
<seeElement selector="{{PageBuilderStage.rootContainer(rowIndex)}}" stepKey="seeEmptyRow"/>
21-
<see userInput="Drag Row, Columns, Tabs, Block, Dynamic Block or HTML Code here" selector="{{PageBuilderStage.rootContainerPlaceholder(rowIndex)}}" stepKey="seeEmptyRowPlaceholderMessage"/>
22-
<seeNumberOfElements userInput="0" selector="{{pageBuilderArea}}{{RowOnStage.allRows}}" stepKey="seeOnlyOneRow"/>
19+
<waitForElementVisible selector="{{RowOnStage.empty(rowIndex)}}" stepKey="waitForEmptyRow"/>
20+
<seeElement selector="{{RowOnStage.empty(rowIndex)}}" stepKey="seeEmptyRow"/>
21+
<see userInput="Drag content types or columns here" selector="{{RowOnStage.emptyPlaceholder(rowIndex)}}" stepKey="seeEmptyRowPlaceholderMessage"/>
22+
<seeNumberOfElements userInput="1" selector="{{pageBuilderArea}}{{RowOnStage.allRows}}" stepKey="seeOnlyOneRow"/>
2323
</actionGroup>
2424
</actionGroups>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<element name="inlineWYSIWYGEditor" type="text" selector="(//div[@data-content-type='{{arg1}}'])[{{arg2}}]//div[contains(@class,'inline-wysiwyg')]|(//div[@data-content-type='{{arg1}}' and contains(@class,'inline-wysiwyg')])[{{arg2}}]" parameterized="true"/>
5252
<element name="inlineWYSIWYGEditorPanel" type="button" selector="(//div[@data-content-type='{{arg1}}'])[{{arg2}}]//div[contains(@class,'mce-tinymce-inline')]|(//div[@data-content-type='{{arg1}}'])[{{arg2}}][following-sibling::div[contains(@class,'mce-tinymce-inline')]]" parameterized="true"/>
5353
<element name="inlineTextAreaEditor" type="button" selector="(//div[@data-content-type='{{arg1}}'])[{{arg2}}]//textarea[@class='inline-wysiwyg-textarea']" parameterized="true"/>
54-
<element name="rootContainer" type="text" selector="(//div[contains(@class,&quot;pagebuilder-content-type&quot;) and contains(@class,&quot;pagebuilder-root-container&quot;)])[{{arg1}}]" parameterized="true"/>
55-
<element name="rootContainerPlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-content-type') and contains(@class,'pagebuilder-root-container')])[{{arg1}}][contains(@class,'empty-container')]//div[contains(@class,'empty-placeholder')]" parameterized="true"/>
54+
<element name="rootContainer" type="text" selector="(//div[contains(@class,&quot;pagebuilder-content-type&quot;) and contains(@class,&quot;pagebuilder-root-container&quot;)])[{{index}}]" parameterized="true"/>
55+
<element name="rootContainerPlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-content-type') and contains(@class,'pagebuilder-root-container')])[{{index}}][contains(@class,'empty-container')]//div[contains(@class,'empty-placeholder')]" parameterized="true"/>
5656
</section>
5757
</sections>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockAddAndEditRowColumnSlideTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
<argument name="CMSPage" value="$$createCMSPage$$"/>
4949
</actionGroup>
5050
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage" after="navigateToCreatedCMSPage"/>
51-
<actionGroup ref="dragContentTypeToStage" stepKey="dragRootRowToStage" after="switchToPageBuilderStage">
51+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer" after="switchToPageBuilderStage">
5252
<argument name="contentType" value="PageBuilderRowContentType"/>
5353
<argument name="containerTargetType" value="PageBuilderRootContainerContentType"/>
5454
</actionGroup>
55-
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent" after="dragRootRowToStage">
55+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent" after="dragRowToRootContainer">
5656
<argument name="contentType" value="PageBuilderBlockContentType"/>
5757
</actionGroup>
5858
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage" after="expandMenuSectionAddContent">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockVerifyCanAddChildContentTypesFromOnHoverOptionMenusTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
<argument name="CMSPage" value="$$createCMSPage$$"/>
4747
</actionGroup>
4848
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage" after="navigateToCreatedCMSPage"/>
49-
<actionGroup ref="dragContentTypeToStage" stepKey="dragRootRowToStage" after="switchToPageBuilderStage">
49+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer" after="switchToPageBuilderStage">
5050
<argument name="contentType" value="PageBuilderRowContentType"/>
5151
<argument name="containerTargetType" value="PageBuilderRootContainerContentType"/>
5252
</actionGroup>
53-
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent" after="dragRootRowToStage">
53+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent" after="dragRowToRootContainer">
5454
<argument name="contentType" value="PageBuilderBlockContentType"/>
5555
</actionGroup>
5656
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage" after="expandMenuSectionAddContent">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockVerifyCanDeleteContentTypesFromOnClickOptionMenusTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
<argument name="CMSPage" value="$$createCMSPage$$"/>
5050
</actionGroup>
5151
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage" after="navigateToCreatedCMSPage"/>
52-
<actionGroup ref="dragContentTypeToStage" stepKey="dragRootRowToStage" after="switchToPageBuilderStage">
52+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer" after="switchToPageBuilderStage">
5353
<argument name="contentType" value="PageBuilderRowContentType"/>
5454
<argument name="containerTargetType" value="PageBuilderRootContainerContentType"/>
5555
</actionGroup>
56-
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent" after="dragRootRowToStage">
56+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent" after="dragRowToRootContainer">
5757
<argument name="contentType" value="PageBuilderBlockContentType"/>
5858
</actionGroup>
5959
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage" after="expandMenuSectionAddContent">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockVerifyCanDeleteContentTypesFromOnHoverOptionMenusTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
<argument name="CMSPage" value="$$createCMSPage$$"/>
5050
</actionGroup>
5151
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage" after="navigateToCreatedCMSPage"/>
52-
<actionGroup ref="dragContentTypeToStage" stepKey="dragRootRowToStage" after="switchToPageBuilderStage">
52+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer" after="switchToPageBuilderStage">
5353
<argument name="contentType" value="PageBuilderRowContentType"/>
5454
<argument name="containerTargetType" value="PageBuilderRootContainerContentType"/>
5555
</actionGroup>
56-
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent" after="dragRootRowToStage">
56+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent" after="dragRowToRootContainer">
5757
<argument name="contentType" value="PageBuilderBlockContentType"/>
5858
</actionGroup>
5959
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage" after="expandMenuSectionAddContent">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockVerifyCanDuplicateContentTypesFromOnClickOptionMenusTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
<argument name="CMSPage" value="$$createCMSPage$$"/>
4747
</actionGroup>
4848
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage" after="navigateToCreatedCMSPage"/>
49-
<actionGroup ref="dragContentTypeToStage" stepKey="dragRootRowToStage" after="switchToPageBuilderStage">
49+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer" after="switchToPageBuilderStage">
5050
<argument name="contentType" value="PageBuilderRowContentType"/>
5151
<argument name="containerTargetType" value="PageBuilderRootContainerContentType"/>
5252
</actionGroup>
53-
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent" after="dragRootRowToStage">
53+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent" after="dragRowToRootContainer">
5454
<argument name="contentType" value="PageBuilderBlockContentType"/>
5555
</actionGroup>
5656
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage" after="expandMenuSectionAddContent">

0 commit comments

Comments
 (0)