Skip to content

Commit 80e2d9d

Browse files
committed
MAGETWO-91377: Create MFTF Tests
- addressing code review comments
1 parent 756c4a7 commit 80e2d9d

9 files changed

+366
-288
lines changed

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

Lines changed: 185 additions & 190 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<actionGroup name="unfocusSlideOptions">
2020
<click selector="{{PageBuilderActionsSection.searchPanel}}" stepKey="clickOutsideLiveEdit"/>
2121
<waitForPageLoad stepKey="waitForAnimation" time="30"/>
22-
<dontSeeElement selector="{{SliderInAdmin.slideOptionsEdit}}" stepKey="dontSeeHeadingTypeToolbar"/>
22+
<waitForElementNotVisible selector="{{SliderInAdmin.slideOptionsEdit}}" stepKey="dontSeeSlideOptionsEdit"/>
2323
</actionGroup>
2424
<actionGroup name="openSlideOptions">
2525
<comment userInput="Open slide options" stepKey="commentOpen"/>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<element name="stageWrapperFullScreen" type="button" selector="div.pagebuilder-stage-wrapper.stage-full-screen"/>
1919
<element name="searchField" type="input" selector='//*[@id="pagebuilder-panel"]/div[1]/a'/>
2020
<element name="clearSearch" type="button" selector='//*[@id="pagebuilder-panel"]/div[1]/a'/>
21+
<element name="collapsePanel" type="button" selector='//div[contains(@class, "panel-controls")]//a[contains(@class, "collapse")]'/>
22+
<element name="panelCollapsed" type="button" selector='(//div[contains(@class, "pagebuilder-stage") and contains(@class, "panel-collapsed")])'/>
23+
<element name="expandPanel" type="button" selector='//div[contains(@class, "expand")]//a'/>
2124
<element name="firstSection" type="button" selector='//*[@id="pagebuilder-panel-groups"]/li[1]' timeout="30"/>
2225
<element name="panelGroup" type="button" selector="//div[@id='pagebuilder-panel']//h4[.='{{arg1}}']" parameterized="true"/>
2326
<element name="panelGroupActive" type="button" selector="//div[@id='pagebuilder-panel']//li[@class='active']//h4[.='{{arg1}}']" parameterized="true"/>
@@ -45,7 +48,6 @@
4548
<element name="dropAreaInStage" type="button" selector='(//div[contains(@class, "type-container") and contains(@class, "pagebuilder-row")])[1]//div[contains(@class,"pagebuilder-empty-container")][1]'/>
4649
<element name="dropZone" type="button" selector='(//div[contains(@class, "{{arg1}}-container")])[{{arg2}}]//div[contains(@class,"pagebuilder-drop-indicator")][{{arg3}}]' parameterized="true"/>
4750
<element name="stageLoading" type="button" selector="div.pagebuilder-stage-loading"/>
48-
<element name="stageActive" type="button" selector='(//div[contains(@class, "content-type-drop") and contains(@class, "active")])[1]'/>
4951
<element name="contentBlockInStage" type="button" selector='(//div[contains(@class, "pagebuilder-content-type") and contains(@class, "pagebuilder-{{arg1}}")])[1]' parameterized="true"/>
5052
<element name="contentBlockInStageByIndex" type="button" selector='(//div[contains(@class, "pagebuilder-content-type") and contains(@class, "pagebuilder-{{arg1}}")])[{{arg2}}]' parameterized="true"/>
5153
<element name="contentBlockContainer" type="button" selector='(//div[contains(@class, "pagebuilder-content-type") and contains(@class, "pagebuilder-{{arg1}}")])[{{arg2}}]/descendant::div[contains(@class, "element-children")]' parameterized="true"/>

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
</test>
188188
<test name="MapAddToColumn">
189189
<annotations>
190-
<features value="PageBuilder"/>
190+
<features value="Pagebuilder"/>
191191
<stories value="Column"/>
192192
<useCaseId value="MAGETWO-88269"/>
193193
<title value="Add Map to Column container and view on Admin and Storefront"/>
@@ -259,12 +259,12 @@
259259
<argument name="height" value="PageBuilderMapHeightProperty500px"/>
260260
</actionGroup>
261261
</test>
262-
<test name="MoveContentBetweenColumns">
262+
<test name="ColumnsMoveContentBetweenColumns">
263263
<annotations>
264-
<features value="PageBuilder"/>
264+
<features value="Pagebuilder"/>
265265
<stories value="Column"/>
266266
<useCaseId value="MAGETWO-88269"/>
267-
<title value="Move existing content between columns"/>
267+
<title value="Move Heading between columns"/>
268268
<description value="As a Content Manager I want to be able to move content between column containers"/>
269269
<severity value="CRITICAL"/>
270270
<testCaseId value="MAGETWO-92361"/>
@@ -354,10 +354,11 @@
354354
<annotations>
355355
<features value="Pagebuilder"/>
356356
<stories value="Column"/>
357-
<title value="Add Column group below existing columns group on stage"/>
358-
<description value="User sees row adjusting height when a second column group is created"/>
357+
<title value="Drag Column containing Heading from one column group to another in the same row"/>
358+
<description value="Move column containing content blocks between column groups"/>
359359
<severity value="CRITICAL"/>
360360
<testCaseId value="MAGETWO-87113"/>
361+
<useCaseId value="MAGETWO-86953"/>
361362
<group value="pagebuilder"/>
362363
<group value="pagebuilder-column"/>
363364
<group value="pagebuilder-heading"/>
@@ -400,7 +401,6 @@
400401
<argument name="containerTargetIndex" value="3"/>
401402
</actionGroup>
402403
<comment userInput="Validate heading is in third column" stepKey="commentConfirmHeadingInThirdColumn"/>
403-
404404
<actionGroup ref="validateContentBlockInsideContainerStage" stepKey="confirmHeadingInThirdColumn">
405405
<argument name="containerTargetType" value="PageBuilderColumnContentBlock"/>
406406
<argument name="containerTargetIndex" value="3"/>

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

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<title value="Add column into a row and row height adjusts"/>
1616
<description value="A user should be able to add a column group into a row."/>
1717
<severity value="CRITICAL"/>
18+
<useCaseId value="MAGETWO-86953"/>
1819
<testCaseId value="MAGETWO-82860"/>
1920
<group value="pagebuilder"/>
2021
<group value="pagebuilder-column"/>
@@ -64,7 +65,7 @@
6465
<description value="A user should be able to remove columns from rows."/>
6566
<severity value="CRITICAL"/>
6667
<testCaseId value="MAGETWO-82861"/>
67-
<useCaseId value="MAGETWO-66176"/>
68+
<useCaseId value="MAGETWO-86953"/>
6869
<group value="pagebuilder"/>
6970
<group value="pagebuilder-column"/>
7071
</annotations>
@@ -187,13 +188,13 @@
187188
</test>
188189
<test name="ColumnLabelsUpdate">
189190
<annotations>
190-
<features value="Pagebuilder: Column"/>
191-
<stories value="MAGETWO-87068: Empty Column Admin Preview"/>
191+
<features value="Pagebuilder"/>
192+
<stories value="Column"/>
192193
<title value="Column labels for columns update when a new column is added"/>
193194
<description value="A user should be able to see column labels update when a new column is added causing resize."/>
194195
<severity value="CRITICAL"/>
195-
<testCaseId value="MAGETWO-87068"/>
196-
<testCaseId value="MAGETWO-87273"/>
196+
<useCaseId value="MAGETWO-87068"/>
197+
<testCaseId value="MAGETWO-92414"/>
197198
<group value="pagebuilder"/>
198199
<group value="pagebuilder-column"/>
199200
</annotations>
@@ -211,17 +212,17 @@
211212
<argument name="containerTargetIndex" value="1"/>
212213
<argument name="contentBlockIndex" value="1"/>
213214
</actionGroup>
214-
<waitForElement selector="{{PageBuilderColumnSection.displayLabel('1','3/6')}}" stepKey="findBeforeLabelColumn1"/>
215-
<waitForElement selector="{{PageBuilderColumnSection.displayLabel('2','3/6')}}" stepKey="findBeforeLabelColumn2"/>
215+
<waitForElementVisible selector="{{PageBuilderColumnSection.displayLabel('1','3/6')}}" stepKey="findBeforeLabelColumn1"/>
216+
<waitForElementVisible selector="{{PageBuilderColumnSection.displayLabel('2','3/6')}}" stepKey="findBeforeLabelColumn2"/>
216217
<actionGroup ref="dragContentBlockToContainer" stepKey="dragNewColumnToFirstColumn">
217218
<argument name="contentBlockType" value="PageBuilderColumnContentBlock"/>
218219
<argument name="containerTargetType" value="PageBuilderColumnContentBlock"/>
219220
<argument name="containerTargetIndex" value="1" />
220221
<argument name="contentBlockIndex" value="1"/>
221222
</actionGroup>
222-
<waitForElement selector="{{PageBuilderColumnSection.displayLabel('1','1/6')}}" stepKey="findAfterLabelColumn1"/>
223-
<waitForElement selector="{{PageBuilderColumnSection.displayLabel('2','2/6')}}" stepKey="findAfterLabelColumn2"/>
224-
<waitForElement selector="{{PageBuilderColumnSection.displayLabel('3','3/6')}}" stepKey="findAfterLabelColumn3"/>
223+
<waitForElementVisible selector="{{PageBuilderColumnSection.displayLabel('1','1/6')}}" stepKey="findAfterLabelColumn1"/>
224+
<waitForElementVisible selector="{{PageBuilderColumnSection.displayLabel('2','2/6')}}" stepKey="findAfterLabelColumn2"/>
225+
<waitForElementVisible selector="{{PageBuilderColumnSection.displayLabel('3','3/6')}}" stepKey="findAfterLabelColumn3"/>
225226
</test>
226227
<test name="ColumnCanInteractEditPanel">
227228
<annotations>
@@ -931,9 +932,10 @@
931932
<annotations>
932933
<features value="Pagebuilder"/>
933934
<stories value="Column"/>
934-
<title value="Columns are the same height in the row when one column contains multiple content blocks"/>
935+
<title value="Columns are the same height in the row when one column contains multiple Heading content blocks"/>
935936
<description value="Validate columns are the same height on the frontend when one contains content blocks"/>
936937
<useCaseId value="MAGETWO-71365"/>
938+
<testCaseId value="MAGETWO-92415"/>
937939
<severity value="CRITICAL"/>
938940
<group value="pagebuilder"/>
939941
<group value="pagebuilder-column"/>
@@ -1088,9 +1090,11 @@
10881090
<test name="DragMultipleColumnsIntoRow">
10891091
<annotations>
10901092
<features value="Pagebuilder"/>
1093+
<stories value="Column"/>
10911094
<title value="Row can contain multiple column groups"/>
10921095
<description value="Validate multiple columns can be dragged into a row"/>
1093-
<useCaseId value="MAGETWO-92344"/>
1096+
<useCaseId value="MAGETWO-86953"/>
1097+
<testCaseId value="MAGETWO-92344"/>
10941098
<severity value="CRITICAL"/>
10951099
<group value="pagebuilder"/>
10961100
<group value="pagebuilder-column"/>

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

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,57 @@
190190
<dontSee userInput="r" selector="{{PageBuilderActionsSection.searchPanel}}" stepKey="validateInputClearedAfterRemoveCharacters"/>
191191
<actionGroup ref="validateGroupsAndContentTypes" stepKey="validateGroupsAndContentTypesAfterClearField"/>
192192
</test>
193+
<test name="SearchContentBlockAndAddToStage">
194+
<annotations>
195+
<features value="Pagebuilder"/>
196+
<stories value="Panel"/>
197+
<title value="Search for content blocks and add them to stage"/>
198+
<description value="After search I can drag and drop content blocks onto the stage before and after clicking X on the panel search "/>
199+
<severity value="CRITICAL"/>
200+
<testCaseId value="MAGETWO-89887"/>
201+
<useCaseId value="MAGETWO-92004"/>
202+
<group value="pagebuilder"/>
203+
<group value="pagebuilder-panel"/>
204+
</annotations>
205+
<before>
206+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
207+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
208+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
209+
</before>
210+
<after>
211+
<actionGroup ref="logout" stepKey="logout"/>
212+
</after>
213+
<comment userInput="Search Map in Panel and drag to stage" stepKey="commentSearchMap"/>
214+
<fillField selector="{{PageBuilderActionsSection.searchPanel}}" userInput="Map" stepKey="fillSearchField"/>
215+
<actionGroup ref="dragContentBlockToStage" stepKey="dragContentBlockToStage">
216+
<argument name="contentBlockType" value="PageBuilderMapContentBlock"/>
217+
</actionGroup>
218+
<actionGroup ref="closeEditPanelSettings" stepKey="closeEditPanelSettings"/>
219+
<comment userInput="Clear search Map and drag Column to stage" stepKey="commentClearSearch"/>
220+
<waitForElementVisible selector='{{PageBuilderActionsSection.searchField}}' stepKey="seeClearSearch"/>
221+
<click selector='{{PageBuilderActionsSection.searchField}}' stepKey="clickClearSearch"/>
222+
<actionGroup ref="dragContentBlockToStage" stepKey="dragColumnToStage">
223+
<argument name="contentBlockType" value="PageBuilderColumnContentBlock"/>
224+
</actionGroup>
225+
<comment userInput="Collapse and Expand panel then drag Tabs to Column" stepKey="commentDragTabs"/>
226+
<waitForElementVisible selector="{{PageBuilderActionsSection.stageWrapper}}" stepKey="waitForStage"/>
227+
<waitForElementVisible selector="{{PageBuilderActionsSection.collapsePanel}}" stepKey="waitForCollapseButton"/>
228+
<click selector="{{PageBuilderActionsSection.collapsePanel}}" stepKey="clickCollapseButton"/>
229+
<waitForElementVisible selector="{{PageBuilderActionsSection.expandPanel}}" stepKey="waitForExpandButton"/>
230+
<waitForElementVisible selector="{{PageBuilderActionsSection.panelCollapsed}}" stepKey="waitForPanelCollapsed"/>
231+
<waitForElementNotVisible selector="{{PageBuilderActionsSection.collapsePanel}}" stepKey="waitForCollapsePanelButtonNotVisible"/>
232+
<waitForElementNotVisible selector="{{PageBuilderActionsSection.searchPanel}}" stepKey="waitForSearchFieldNotVisible"/>
233+
<click selector="{{PageBuilderActionsSection.expandPanel}}" stepKey="clickExpandButton"/>
234+
<waitForElementNotVisible selector="{{PageBuilderActionsSection.panelCollapsed}}" stepKey="waitForPanelCollapsedNotVisible"/>
235+
<waitForElementNotVisible selector="{{PageBuilderActionsSection.expandPanel}}" stepKey="waitForExpandButtonNotVisible"/>
236+
<waitForElementVisible selector="{{PageBuilderActionsSection.collapsePanel}}" stepKey="waitForCollapseButtonVisible"/>
237+
<waitForElementVisible selector="{{PageBuilderActionsSection.searchPanel}}" stepKey="waitForSearchField"/>
238+
<fillField selector="{{PageBuilderActionsSection.searchPanel}}" userInput="ta" stepKey="fillSearchFieldTa"/>
239+
<actionGroup ref="dragContentBlockToContainer" stepKey="dragTabsIntoFirstColumn">
240+
<argument name="contentBlockType" value="PageBuilderTabsContentBlock"/>
241+
<argument name="containerTargetType" value="PageBuilderColumnContentBlock"/>
242+
<argument name="containerTargetIndex" value="1"/>
243+
</actionGroup>
244+
<dontSeeJsError stepKey="dontSeeJsError"/>
245+
</test>
193246
</tests>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@
235235
<argument name="index" value="2"/>
236236
</actionGroup>
237237
<comment userInput="Stage: Check Drop Zones still present before, between, and after rows" stepKey="commentDropZones"/>
238-
<seeElementInDOM selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '1')}}" stepKey="waitForFirstDropZone" />
239-
<seeElementInDOM selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '2')}}" stepKey="waitForSecondDropZone" />
240-
<seeElementInDOM selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '3')}}" stepKey="waitForThirdDropZone" />
238+
<waitForElement selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '1')}}" stepKey="waitForFirstDropZone" />
239+
<waitForElement selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '2')}}" stepKey="waitForSecondDropZone" />
240+
<waitForElement selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '3')}}" stepKey="waitForThirdDropZone" />
241241
</test>
242242
<test name="RowAddAdditionalRowAboveInitialRow">
243243
<annotations>
@@ -289,9 +289,9 @@
289289
<argument name="index" value="1"/>
290290
</actionGroup>
291291
<comment userInput="Stage: Check Drop Zones still present before, between, and after rows" stepKey="commentDropZones"/>
292-
<seeElementInDOM selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '1')}}" stepKey="waitForFirstDropZone" />
293-
<seeElementInDOM selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '2')}}" stepKey="waitForSecondDropZone" />
294-
<seeElementInDOM selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '3')}}" stepKey="waitForThirdDropZone" />
292+
<waitForElement selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '1')}}" stepKey="waitForFirstDropZone" />
293+
<waitForElement selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '2')}}" stepKey="waitForSecondDropZone" />
294+
<waitForElement selector="{{PageBuilderActionsSection.dropZone(PageBuilderStage.role, '1', '3')}}" stepKey="waitForThirdDropZone" />
295295
</test>
296296
<test name="RowRemoveRowFromStage">
297297
<annotations>

0 commit comments

Comments
 (0)