Skip to content

Commit a484844

Browse files
committed
MAGETWO-91377: Create MFTF Tests
- addressing code review comments
1 parent 91f2dfa commit a484844

File tree

4 files changed

+33
-11
lines changed

4 files changed

+33
-11
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockInStage(contentBlockType.role)}}" stepKey="waitForContentBlockInStage"/>
9999
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="waitForContentBlockNameInEditFormTitle"/>
100100
<see userInput="Edit {{contentBlockType.editPanelName}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentBlockNameInEditFormTitle"/>
101-
<waitForPageLoad stepKey="waitForEditFormLoad" time="30"/>
102101
</actionGroup>
103102
<actionGroup name="dragContentBlockToContainerAndExpectEditPanel">
104103
<arguments>
@@ -113,7 +112,6 @@
113112
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInContainer"/>
114113
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="waitForContentBlockNameInEditFormTitle"/>
115114
<see userInput="Edit {{contentBlockType.editPanelName}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentBlockNameInEditFormTitle"/>
116-
<waitForPageLoad stepKey="waitForEditFormLoad" time="30"/>
117115
</actionGroup>
118116
<actionGroup name="dragContentBlockToContainer">
119117
<arguments>

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

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
<title value="Search for content blocks and add them to stage"/>
198198
<description value="After search I can drag and drop content blocks onto the stage before and after clicking X on the panel search "/>
199199
<severity value="CRITICAL"/>
200-
<testCaseId value="MAGETWO-89887"/>
200+
<testCaseId value="MAGETWO-92386"/>
201201
<useCaseId value="MAGETWO-92004"/>
202202
<group value="pagebuilder"/>
203203
<group value="pagebuilder-panel"/>
@@ -222,6 +222,31 @@
222222
<actionGroup ref="dragContentBlockToStage" stepKey="dragColumnToStage">
223223
<argument name="contentBlockType" value="PageBuilderColumnContentBlock"/>
224224
</actionGroup>
225+
<dontSeeJsError stepKey="dontSeeJsError"/>
226+
</test>
227+
<test name="PanelExpandAndCollapseAndAddToStage">
228+
<annotations>
229+
<features value="Pagebuilder"/>
230+
<stories value="Panel"/>
231+
<title value="Collapse and Expand search panel and still able to search and add to stage"/>
232+
<description value="After expand and collapse search panel I can search and drop content blocks onto the stage"/>
233+
<severity value="CRITICAL"/>
234+
<useCaseId value="MAGETWO-92004"/>
235+
<testCaseId value="MAGETWO-92470"/>
236+
<group value="pagebuilder"/>
237+
<group value="pagebuilder-panel"/>
238+
</annotations>
239+
<before>
240+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
241+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
242+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
243+
</before>
244+
<after>
245+
<actionGroup ref="logout" stepKey="logout"/>
246+
</after>
247+
<actionGroup ref="dragContentBlockToStage" stepKey="dragColumnToStage">
248+
<argument name="contentBlockType" value="PageBuilderColumnContentBlock"/>
249+
</actionGroup>
225250
<comment userInput="Collapse and Expand panel then drag Tabs to Column" stepKey="commentDragTabs"/>
226251
<waitForElementVisible selector="{{PageBuilderActionsSection.stageWrapper}}" stepKey="waitForStage"/>
227252
<waitForElementVisible selector="{{PageBuilderActionsSection.collapsePanel}}" stepKey="waitForCollapseButton"/>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,6 @@
434434
<actionGroup ref="removeEmptyContentBlockFromStage" stepKey="removeHeaderFromRow">
435435
<argument name="contentBlockType" value="PageBuilderHeadingContentBlock"/>
436436
</actionGroup>
437-
<waitForPageLoad time="30" stepKey="waitForShrinkAnimationAfterRemove"/>
438437
<!-- Assert row height is 320px after removing children -->
439438
<comment userInput="Assert row height is 320px after removing children" stepKey="comment3"/>
440439
<executeJS function="document.querySelectorAll('{{RowOnStage.baseCss}}')[0].setAttribute('divHeight', document.querySelectorAll('{{RowOnStage.baseCss}}')[0].clientHeight)" stepKey="setNewRowHeight2"/>

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@
11391139
<comment userInput="Attempt to drag heading block onto top part of slider" stepKey="commentValidateAboveSlider"/>
11401140
<executeJS function="{{PageBuilderActionsSection.computedHeightOnStage(PageBuilderSliderContentBlock.role,'1')}}" stepKey="actualStageSliderHeight"/>
11411141
<executeJS function="{{PageBuilderActionsSection.computedWidthOnStage(PageBuilderSliderContentBlock.role,'1')}}" stepKey="actualStageSliderWidth"/>
1142-
<executeJS function="return Math.round({$actualStageSliderWidth}-{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.paddingTop}}-{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.paddingBottom}})" stepKey="sliderWidthSansPadding"/>
1142+
<executeJS function="return Math.round({$actualStageSliderWidth}-{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.paddingLeft}}-{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.paddingRight}})" stepKey="sliderWidthSansPadding"/>
11431143
<executeJS function="return Math.round({$sliderWidthSansPadding}/20)" stepKey="sliderWidthOffset"/>
11441144
<executeJS function="return Math.round({$actualStageSliderHeight}-{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.paddingTop}}-{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.paddingBottom}})" stepKey="sliderHeightSansPadding"/>
11451145
<executeJS function="return Math.round({$sliderHeightSansPadding}/5)" stepKey="sliderHeightOffset"/>
@@ -1149,19 +1149,19 @@
11491149
<argument name="offsetXCoordinate" value="$sliderWidthOffset"/>
11501150
<argument name="offsetYCoordinate" value="$sliderHeightOffset"/>
11511151
</actionGroup>
1152-
<actionGroup ref="clickOutsideLiveEditHeading" stepKey="clickOutsideLiveEditHeading1">
1153-
<argument name="index" value="1"/>
1154-
</actionGroup>
1152+
<moveMouseOver selector="{{PageBuilderActionsSection.searchPanel}}" stepKey="moveMouseOutsideLiveEdit1"/>
1153+
<click selector="{{PageBuilderActionsSection.searchPanel}}" stepKey="clickOutsideLiveEdit1"/>
1154+
<waitForPageLoad time="30" stepKey="waitForAnimation1"/>
11551155
<comment userInput="Attempt to drag heading block onto bottom part of slider" stepKey="commentValidateBelowSlider"/>
11561156
<actionGroup ref="dragContentBlockToContentBlock" stepKey="dragHeadingOntoSliderBottom">
11571157
<argument name="contentBlockType" value="PageBuilderHeadingContentBlock"/>
11581158
<argument name="targetBlockType" value="PageBuilderSliderContentBlock"/>
11591159
<argument name="offsetXCoordinate" value="$sliderWidthOffset"/>
11601160
<argument name="offsetYCoordinate" value="$sliderHeightSansPadding"/>
11611161
</actionGroup>
1162-
<actionGroup ref="clickOutsideLiveEditHeading" stepKey="clickOutsideLiveEditHeading2">
1163-
<argument name="index" value="2"/>
1164-
</actionGroup>
1162+
<moveMouseOver selector="{{PageBuilderActionsSection.searchPanel}}" stepKey="moveMouseOutsideLiveEdit2"/>
1163+
<click selector="{{PageBuilderActionsSection.searchPanel}}" stepKey="clickOutsideLiveEdit2"/>
1164+
<waitForPageLoad time="30" stepKey="waitForAnimation2"/>
11651165
<actionGroup ref="validateContentBlockInsideContainerStage" stepKey="validateHeadingFirst">
11661166
<argument name="containerTargetType" value="PageBuilderRowContentBlock"/>
11671167
<argument name="containerTargetIndex" value="1"/>

0 commit comments

Comments
 (0)