Skip to content

Commit e5cbd73

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

File tree

5 files changed

+63
-27
lines changed

5 files changed

+63
-27
lines changed

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

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@
5252
<actionGroup name="switchToPageBuilderStage">
5353
<waitForElementVisible time="30" selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForElementVisible"/>
5454
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContent"/>
55+
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
5556
<!-- Wait for the first row to be added into the stage for it to be "ready" -->
56-
<waitForElementNotVisible selector="{{PageBuilderActionsSection.stageLoading}}" stepKey="waitForStageLoad"/>
57+
<waitForElementNotVisible selector="{{PageBuilderActionsSection.stageLoading}}" stepKey="waitForStageLoadingGraphicNotVisible"/>
5758
<waitForElementVisible time="30" selector="{{RowOnStage.base('1')}}" stepKey="waitForPageBuilderRow"/>
5859
</actionGroup>
5960
<actionGroup name="expandConfigurationSection">
@@ -76,22 +77,24 @@
7677
</arguments>
7778
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.draggableContentBlockInPanel(contentBlockType.name)}}" stepKey="waitForContentBlockInPanel"/>
7879
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentBlockInPanel(contentBlockType.name)}}" selector2="{{PageBuilderActionsSection.dropAreaInStage}}" stepKey="dropContentBlockIntoStage"/>
80+
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
7981
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" stepKey="waitForContentBlockInStage"/>
80-
<waitForPageLoad stepKey="waitForToolbarsToLoad" time="30"/>
8182
</actionGroup>
8283
<actionGroup name="dragContentBlockToStageByIndex">
8384
<arguments>
8485
<argument name="contentBlockType"/>
8586
<argument name="contentBlockNumber" defaultValue="1" type="string"/>
8687
</arguments>
8788
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentBlockInPanel(contentBlockType.name)}}" selector2="{{PageBuilderActionsSection.dropAreaInStage}}" stepKey="dropContentBlockIntoStage"/>
89+
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
8890
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="waitForContentBlockInStage"/>
8991
</actionGroup>
9092
<actionGroup name="dragContentBlockToStageAndExpectEditPanel">
9193
<arguments>
9294
<argument name="contentBlockType"/>
9395
</arguments>
9496
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentBlockInPanel(contentBlockType.name)}}" selector2="{{PageBuilderActionsSection.dropAreaInStage}}" stepKey="dropContentBlockIntoStage"/>
97+
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
9598
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" stepKey="waitForContentBlockInStage"/>
9699
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="waitForContentBlockNameInEditFormTitle"/>
97100
<see userInput="Edit {{contentBlockType.editPanelName}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentBlockNameInEditFormTitle"/>
@@ -106,6 +109,7 @@
106109
</arguments>
107110
<scrollTo selector="{{CmsNewPagePageActionsSection.contentSectionName}}" stepKey="scrollToTopOfStage"/>
108111
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentBlockInPanel(contentBlockType.name)}}" selector2="{{PageBuilderActionsSection.contentBlockContainer(containerTargetType.role, containerTargetIndex)}}" stepKey="dropContentBlockIntoStage"/>
112+
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
109113
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInContainer"/>
110114
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="waitForContentBlockNameInEditFormTitle"/>
111115
<see userInput="Edit {{contentBlockType.editPanelName}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentBlockNameInEditFormTitle"/>
@@ -122,19 +126,22 @@
122126
</arguments>
123127
<scrollTo selector="{{CmsNewPagePageActionsSection.contentSectionName}}" stepKey="scrollToTopOfStage"/>
124128
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentBlockInPanel(contentBlockType.name)}}" selector2="{{PageBuilderActionsSection.contentBlockContainer(containerTargetType.role, containerTargetIndex)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="dropContentBlockIntoStage"/>
129+
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
125130
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInStage"/>
126131
</actionGroup>
127132
<!-- Test to ensure a content block doesn't receive drop events -->
128133
<actionGroup name="dragContentBlockToContentBlock">
129134
<arguments>
130135
<argument name="contentBlockType"/>
136+
<argument name="contentBlockIndex" defaultValue="1" type="string"/>
131137
<argument name="targetBlockType"/>
132138
<argument name="offsetXCoordinate" defaultValue="null" type="string"/>
133139
<argument name="offsetYCoordinate" defaultValue="null" type="string"/>
134140
</arguments>
135141
<scrollTo selector="{{CmsNewPagePageActionsSection.contentSectionName}}" stepKey="scrollToTopOfStage"/>
136142
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentBlockInPanel(contentBlockType.name)}}" selector2="{{PageBuilderActionsSection.contentBlockInStage(targetBlockType.role)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="dropContentBlockIntoStage"/>
137-
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" stepKey="waitForContentBlockInStage"/>
143+
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
144+
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInStage"/>
138145
</actionGroup>
139146
<actionGroup name="dragContentBlockToDropZone">
140147
<arguments>
@@ -163,10 +170,11 @@
163170
</arguments>
164171
<waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInStageVisible"/>
165172
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentBlockStage"/>
166-
<waitForPageLoad stepKey="waitForAnimation" time="30"/>
173+
<waitForPageLoad time="30" stepKey="waitForAnimation"/>
167174
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenuByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForOptions"/>
168175
<waitForElementVisible selector="{{PageBuilderActionsSection.contentBlockMoveByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForEditButton"/>
169176
<dragAndDrop selector1="{{PageBuilderActionsSection.contentBlockMoveByIndex(contentBlockType.role, contentBlockIndex)}}" selector2="{{PageBuilderActionsSection.contentBlockContainer(containerTargetType.role, containerTargetIndex)}}" stepKey="moveContentTypeIntoContainer"/>
177+
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
170178
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInStage"/>
171179
</actionGroup>
172180
<actionGroup name="openPageBuilderEditPanel">
@@ -177,13 +185,12 @@
177185
</arguments>
178186
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" stepKey="waitForContentBlockInStageVisible"/>
179187
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentBlockStage"/>
180-
<wait time="4" stepKey="waitForMouseOverAnimation"/>
188+
<waitForPageLoad time="30" stepKey="waitForAnimation"/>
181189
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenu(contentBlockType.role)}}" stepKey="waitForOptions"/>
182190
<click selector="{{PageBuilderActionsSection.contentBlockEdit(contentBlockType.role)}}" stepKey="clickEditContentBlock"/>
183-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
191+
<waitForPageLoad time="30" stepKey="waitForEditFormToLoad"/>
184192
<waitForElementVisible selector="{{PageBuilderActionsSection.editForm}}" stepKey="waitForEditForm"/>
185193
<see userInput="Edit {{contentBlockType.name}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentBlockNameInEditFormTitle"/>
186-
<waitForLoadingMaskToDisappear stepKey="waitForAnimation2"/>
187194
</actionGroup>
188195
<actionGroup name="openPageBuilderEditPanelByIndex">
189196
<arguments>
@@ -220,18 +227,22 @@
220227
<arguments>
221228
<argument name="contentBlockType"/>
222229
<argument name="contentBlockNumber" defaultValue="1" type="string"/>
230+
<argument name="offsetXCoordinate" defaultValue="10" type="string"/>
231+
<argument name="offsetYCoordinate" defaultValue="0" type="string"/>
223232
</arguments>
224233
<waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="waitForContentBlockInStageVisible"/>
225-
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" x="10" y="0" stepKey="onMouseOverContentBlockStage"/>
234+
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentBlockStage"/>
226235
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockEditByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="waitForOptions"/>
227236
</actionGroup>
228237
<!-- Remove a content type which is in it's default state -->
229238
<actionGroup name="removeEmptyContentBlockFromStage">
230239
<arguments>
231240
<argument name="contentBlockType"/>
241+
<argument name="offsetXCoordinate" defaultValue="10" type="string"/>
242+
<argument name="offsetYCoordinate" defaultValue="5" type="string"/>
232243
</arguments>
233244
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" stepKey="waitForContentBlockInStageVisible"/>
234-
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" x="10" y="5" stepKey="onMouseOverContentBlockStage"/>
245+
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentBlockStage"/>
235246
<wait time="0.5" stepKey="waitForMouseOverAnimation"/>
236247
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenuByIndex(contentBlockType.role, '1')}}" stepKey="waitForOptions"/>
237248
<click selector="{{PageBuilderActionsSection.contentBlockRemove(contentBlockType.role)}}" stepKey="clickRemoveContentBlock"/>
@@ -248,10 +259,10 @@
248259
<waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="waitForContentBlockInStageVisible"/>
249260
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" x="{{x}}" y="{{y}}" stepKey="onMouseOverContentBlockStage"/>
250261
<waitForPageLoad time="30" stepKey="waitForMouseOverAnimation"/>
251-
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenuByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="waitForOptions"/>
262+
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockOptionsMenuByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="waitForOptions"/>
252263
<click selector="{{PageBuilderActionsSection.contentBlockRemoveByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="clickRemoveContentBlock"/>
253264
<waitForPageLoad time="30" stepKey="waitForRemoveAnimation"/>
254-
<waitForElementNotVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="waitForContentBlockRemoval"/>
265+
<!-- Follow with confirmRemovalModal actionGroup -->
255266
</actionGroup>
256267
<actionGroup name="confirmRemovalModal">
257268
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.modal}}" stepKey="waitForModal"/>
@@ -266,12 +277,15 @@
266277
<actionGroup name="removeContentBlockFromStage">
267278
<arguments>
268279
<argument name="contentBlockType"/>
280+
<argument name="offsetXCoordinate" defaultValue="10" type="string"/>
281+
<argument name="offsetYCoordinate" defaultValue="0" type="string"/>
269282
</arguments>
270283
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" stepKey="waitForContentBlockInStageVisible"/>
271-
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" x="10" y="0" stepKey="onMouseOverContentBlockStage"/>
284+
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentBlockStage"/>
272285
<waitForPageLoad stepKey="waitForPageLoad1"/>
273286
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenu(contentBlockType.role)}}" stepKey="waitForOptions"/>
274287
<click selector="{{PageBuilderActionsSection.contentBlockRemove(contentBlockType.role)}}" stepKey="clickRemoveContentBlock"/>
288+
<waitForPageLoad time="30" stepKey="waitForRemoveModal"/>
275289
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.modal}}" stepKey="waitForModal"/>
276290
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.modalOk}}" stepKey="waitForModalOk"/>
277291
<click selector="{{PageBuilderActionsSection.modalOk}}" stepKey="confirmRemoveModal"/>
@@ -348,6 +362,7 @@
348362
<see userInput="{{property.name}}" selector="{{PageBuilderActionsSection.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="seePropertyLabel"/>
349363
<fillField selector="{{PageBuilderColumnSection.panelFieldControl(property.section, property.fieldName)}}" userInput="{{property.value}}" stepKey="fillPropertyField"/>
350364
<click selector="{{PageBuilderActionsSection.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="clickOnFieldLabel"/>
365+
<waitForPageLoad time="30" stepKey="waitForSectionChange"/>
351366
<waitForElementVisible time="2" selector="{{PageBuilderActionsSection.panelSectionChangedIcon(property.section)}}" stepKey="waitForSectionChangedIcon"/>
352367
</actionGroup>
353368
<actionGroup name="fillSlideOutPanelMultiSelectField">

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<title value="Add Tabs into Column and Column Height Adjusts"/>
1616
<description value="User sees columns adjusting their height to the Tabs height that was dropped to them"/>
1717
<severity value="CRITICAL"/>
18+
<useCaseId value="MAGETWO-86953"/>
1819
<testCaseId value="MAGETWO-90670"/>
1920
<group value="pagebuilder"/>
2021
<group value="pagebuilder-column"/>
@@ -61,6 +62,7 @@
6162
<title value="Add Tabs into Column that has large minimum height and Column Height does not shrink"/>
6263
<description value="User sees columns adjusting their height to the Tabs height that was dropped to them unless column minimum height is larger"/>
6364
<severity value="CRITICAL"/>
65+
<useCaseId value="MAGETWO-86953"/>
6466
<testCaseId value="MAGETWO-92063"/>
6567
<group value="pagebuilder"/>
6668
<group value="pagebuilder-column"/>
@@ -126,6 +128,7 @@
126128
<title value="Add Tabs into Column that has small minimum height and Column Height adjusts"/>
127129
<description value="User sees columns adjusting their height to the Tabs height that was dropped to them if column minimum height is smaller"/>
128130
<severity value="CRITICAL"/>
131+
<useCaseId value="MAGETWO-86953"/>
129132
<testCaseId value="MAGETWO-92254"/>
130133
<group value="pagebuilder"/>
131134
<group value="pagebuilder-column"/>
@@ -193,6 +196,7 @@
193196
<title value="Add Map to Column container and view on Admin and Storefront"/>
194197
<description value="As a Content Manager I want column to be a container so that I can add Map inside"/>
195198
<severity value="CRITICAL"/>
199+
<useCaseId value="MAGETWO-86953"/>
196200
<testCaseId value="MAGETWO-89961"/>
197201
<group value="pagebuilder"/>
198202
<group value="pagebuilder-column"/>
@@ -263,10 +267,10 @@
263267
<annotations>
264268
<features value="Pagebuilder"/>
265269
<stories value="Column"/>
266-
<useCaseId value="MAGETWO-88269"/>
267270
<title value="Move Heading between columns"/>
268271
<description value="As a Content Manager I want to be able to move content between column containers"/>
269272
<severity value="CRITICAL"/>
273+
<useCaseId value="MAGETWO-88269"/>
270274
<testCaseId value="MAGETWO-92361"/>
271275
<group value="pagebuilder"/>
272276
<group value="pagebuilder-column"/>

0 commit comments

Comments
 (0)