Skip to content

Commit d116ccb

Browse files
committed
MAGETWO-91377: Create MFTF Tests
- Resolve MFTF name changes from merge
1 parent 27d8b92 commit d116ccb

9 files changed

+300
-300
lines changed

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

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@
110110
<argument name="containerTargetIndex" defaultValue="1" type="string"/>
111111
</arguments>
112112
<scrollTo selector="{{CmsNewPagePageActionsSection.contentSectionName}}" stepKey="scrollToTopOfStage"/>
113-
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentBlockInPanel(contentType.name)}}" selector2="{{PageBuilderActionsSection.contentTypeContainer(containerTargetType.role, containerTargetIndex)}}" stepKey="dropContentBlockIntoStage"/>
113+
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderActionsSection.contentTypeContainer(containerTargetType.role, containerTargetIndex)}}" stepKey="dropContentTypeIntoStage"/>
114114
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
115-
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentBlockInContainer"/>
116-
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="waitForContentBlockNameInEditFormTitle"/>
117-
<see userInput="Edit {{contentType.editPanelName}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentBlockNameInEditFormTitle"/>
115+
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeInContainer"/>
116+
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="waitForContentTypeNameInEditFormTitle"/>
117+
<see userInput="Edit {{contentType.editPanelName}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentTypeNameInEditFormTitle"/>
118118
</actionGroup>
119119
<actionGroup name="dragContentTypeToContainer">
120120
<arguments>
@@ -132,23 +132,23 @@
132132
<waitForPageLoad stepKey="waitForToolbarsToLoad" time="30"/>
133133
</actionGroup>
134134
<!-- Test to ensure a content block doesn't receive drop events -->
135-
<actionGroup name="dragContentBlockToContentBlock">
135+
<actionGroup name="dragContentTypeToContentType">
136136
<arguments>
137-
<argument name="contentBlockType"/>
138-
<argument name="contentBlockIndex" defaultValue="1" type="string"/>
137+
<argument name="contentType"/>
138+
<argument name="contentTypeIndex" defaultValue="1" type="string"/>
139139
<argument name="targetBlockType"/>
140140
<argument name="offsetXCoordinate" defaultValue="null" type="string"/>
141141
<argument name="offsetYCoordinate" defaultValue="null" type="string"/>
142142
</arguments>
143143
<scrollTo selector="{{CmsNewPagePageActionsSection.contentSectionName}}" stepKey="scrollToTopOfStage"/>
144-
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentBlockInPanel(contentBlockType.name)}}" selector2="{{PageBuilderActionsSection.contentBlockInStage(targetBlockType.role)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="dropContentBlockIntoStage"/>
144+
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderActionsSection.contentTypeInStage(targetBlockType.role)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="dropContentTypeIntoStage"/>
145145
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
146-
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInStage"/>
146+
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeInStage"/>
147147
</actionGroup>
148-
<actionGroup name="dragContentBlockToDropZone">
148+
<actionGroup name="dragContentTypeToDropZone">
149149
<arguments>
150-
<argument name="contentBlockType"/>
151-
<argument name="contentBlockIndex" defaultValue="1" type="string"/>
150+
<argument name="contentType"/>
151+
<argument name="contentTypeIndex" defaultValue="1" type="string"/>
152152
<argument name="containerTargetType"/>
153153
<argument name="containerTargetIndex" defaultValue="1" type="string"/>
154154
<argument name="dropZoneIndex" defaultValue="1" type="string"/>
@@ -157,29 +157,29 @@
157157
</arguments>
158158
<scrollTo selector="{{CmsNewPagePageActionsSection.contentSectionName}}" stepKey="scrollToTopOfStage"/>
159159
<waitForElement time="30" selector="{{PageBuilderActionsSection.dropZone(containerTargetType.role, containerTargetIndex, dropZoneIndex)}}" stepKey="waitForStageActive"/>
160-
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentBlockInPanel(contentBlockType.name)}}" selector2="{{PageBuilderActionsSection.dropZone(containerTargetType.role, containerTargetIndex, dropZoneIndex)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="dropContentBlockIntoStage"/>
160+
<dragAndDrop selector1="{{PageBuilderActionsSection.draggableContentTypeInPanel(contentType.name)}}" selector2="{{PageBuilderActionsSection.dropZone(containerTargetType.role, containerTargetIndex, dropZoneIndex)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="dropContentTypeIntoStage"/>
161161
<waitForPageLoad time="30" stepKey="waitForAnimation"/>
162-
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInStage"/>
162+
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeInStage"/>
163163
</actionGroup>
164164
<actionGroup name="moveContentTypeToContainer">
165165
<arguments>
166-
<argument name="contentBlockType"/>
167-
<argument name="contentBlockIndex" defaultValue="1" type="string"/>
166+
<argument name="contentType"/>
167+
<argument name="contentTypeIndex" defaultValue="1" type="string"/>
168168
<argument name="containerTargetType"/>
169169
<argument name="containerTargetIndex" defaultValue="1" type="string"/>
170170
<argument name="offsetXCoordinate" defaultValue="10" type="string"/>
171171
<argument name="offsetYCoordinate" defaultValue="0" type="string"/>
172172
<argument name="containerOffsetXCoordinate" defaultValue="null" type="string"/>
173173
<argument name="containerOffsetYCoordinate" defaultValue="null" type="string"/>
174174
</arguments>
175-
<waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInStageVisible"/>
176-
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentBlockStage"/>
175+
<waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeInStageVisible"/>
176+
<moveMouseOver selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentTypeStage"/>
177177
<waitForPageLoad time="30" stepKey="waitForAnimation"/>
178-
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenuByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForOptions"/>
179-
<waitForElementVisible selector="{{PageBuilderActionsSection.contentBlockMoveByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForEditButton"/>
180-
<dragAndDrop selector1="{{PageBuilderActionsSection.contentBlockMoveByIndex(contentBlockType.role, contentBlockIndex)}}" selector2="{{PageBuilderActionsSection.contentBlockContainer(containerTargetType.role, containerTargetIndex)}}" x="{{containerOffsetXCoordinate}}" y="{{containerOffsetYCoordinate}}" stepKey="moveContentTypeIntoContainer"/>
178+
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeOptionsMenuByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForOptions"/>
179+
<waitForElementVisible selector="{{PageBuilderActionsSection.contentTypeMoveByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForEditButton"/>
180+
<dragAndDrop selector1="{{PageBuilderActionsSection.contentTypeMoveByIndex(contentType.role, contentTypeIndex)}}" selector2="{{PageBuilderActionsSection.contentTypeContainer(containerTargetType.role, containerTargetIndex)}}" x="{{containerOffsetXCoordinate}}" y="{{containerOffsetYCoordinate}}" stepKey="moveContentTypeIntoContainer"/>
181181
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
182-
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInStage"/>
182+
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeInStage"/>
183183
</actionGroup>
184184
<actionGroup name="dragContentTypeNextToExistingContentType">
185185
<arguments>
@@ -835,51 +835,51 @@
835835
<fillField selector="{{ColorPicker.inputField}}" userInput=" " stepKey="inputBlueHexCodeIntoInputField1"/>
836836
<pressKey selector="{{ColorPicker.inputField}}" parameterArray="['{{colorCode.value}}',\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressKeyEnter"/>
837837
</actionGroup>
838-
<actionGroup name="validateContentBlockHeightOnStage">
838+
<actionGroup name="validateContentTypeHeightOnStage">
839839
<arguments>
840-
<argument name="contentBlock"/>
840+
<argument name="contentType"/>
841841
<argument name="index" defaultValue="1" type="string"/>
842842
<argument name="containerDefaultHeight" defaultValue="1"/>
843843
<argument name="expectedPaddingTop" defaultValue="1"/>
844844
<argument name="expectedPaddingBottom" defaultValue="1"/>
845845
</arguments>
846-
<executeJS function="{{PageBuilderActionsSection.computedHeightOnStage(contentBlock.role,index)}}" stepKey="actualStageContentBlockHeight"/>
847-
<executeJS function="return Math.round({{containerDefaultHeight.value}}+{{expectedPaddingTop.paddingTop}}+{{expectedPaddingBottom.paddingBottom}})" stepKey="expectedContentBlockHeightWithPadding"/>
846+
<executeJS function="{{PageBuilderActionsSection.computedHeightOnStage(contentType.role,index)}}" stepKey="actualStageContentTypeHeight"/>
847+
<executeJS function="return Math.round({{containerDefaultHeight.value}}+{{expectedPaddingTop.paddingTop}}+{{expectedPaddingBottom.paddingBottom}})" stepKey="expectedContentTypeHeightWithPadding"/>
848848
<assertEquals stepKey="assertHeightOnStageMatchesExpected">
849-
<expectedResult type="variable">actualStageContentBlockHeight</expectedResult>
850-
<actualResult type="variable">expectedContentBlockHeightWithPadding</actualResult>
849+
<expectedResult type="variable">actualStageContentTypeHeight</expectedResult>
850+
<actualResult type="variable">expectedContentTypeHeightWithPadding</actualResult>
851851
</assertEquals>
852852
</actionGroup>
853-
<actionGroup name="validateContentBlockHeightOnStageWithoutPadding">
853+
<actionGroup name="validateContentTypeHeightOnStageWithoutPadding">
854854
<arguments>
855-
<argument name="contentBlock"/>
855+
<argument name="contentType"/>
856856
<argument name="index" defaultValue="1" type="string"/>
857857
<argument name="containerDefaultHeight" defaultValue="1"/>
858858
</arguments>
859-
<executeJS function="{{PageBuilderActionsSection.computedHeightOnStage(contentBlock.role,index)}}" stepKey="actualStageContentBlockHeight"/>
860-
<executeJS function="return Math.round({{containerDefaultHeight.value}})" stepKey="expectedContentBlockHeightWithPadding"/>
859+
<executeJS function="{{PageBuilderActionsSection.computedHeightOnStage(contentType.role,index)}}" stepKey="actualStageContentTypeHeight"/>
860+
<executeJS function="return Math.round({{containerDefaultHeight.value}})" stepKey="expectedContentTypeHeightWithPadding"/>
861861
<assertEquals stepKey="assertHeightOnStageMatchesExpected">
862-
<expectedResult type="variable">actualStageContentBlockHeight</expectedResult>
863-
<actualResult type="variable">expectedContentBlockHeightWithPadding</actualResult>
862+
<expectedResult type="variable">actualStageContentTypeHeight</expectedResult>
863+
<actualResult type="variable">expectedContentTypeHeightWithPadding</actualResult>
864864
</assertEquals>
865865
</actionGroup>
866-
<actionGroup name="validateContentBlockInsideContainerStage">
866+
<actionGroup name="validateContentTypeInsideContainerStage">
867867
<arguments>
868-
<argument name="contentBlockType"/>
869-
<argument name="contentBlockIndex" defaultValue="1" type="string"/>
868+
<argument name="contentType"/>
869+
<argument name="contentTypeIndex" defaultValue="1" type="string"/>
870870
<argument name="containerTargetType"/>
871871
<argument name="containerTargetIndex" defaultValue="1" type="string"/>
872872
<argument name="positionInContainer" defaultValue="1" type="string"/>
873873
</arguments>
874-
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInsideContainerStage(containerTargetType.role, containerTargetIndex, positionInContainer, contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockStage"/>
874+
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentTypeInsideContainerStage(containerTargetType.role, containerTargetIndex, positionInContainer, contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeStage"/>
875875
</actionGroup>
876-
<actionGroup name="validateContentBlockInsideContainerStorefront">
876+
<actionGroup name="validateContentTypeInsideContainerStorefront">
877877
<arguments>
878-
<argument name="contentBlockType"/>
879-
<argument name="contentBlockIndex" defaultValue="1" type="string"/>
878+
<argument name="contentType"/>
879+
<argument name="contentTypeIndex" defaultValue="1" type="string"/>
880880
<argument name="containerTargetType"/>
881881
<argument name="containerTargetIndex" defaultValue="1" type="string"/>
882882
</arguments>
883-
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentBlockInsideContainerStorefront(containerTargetType.role, containerTargetIndex, contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockStorefront"/>
883+
<waitForElementVisible time="30" selector="{{PageBuilderActionsSection.contentTypeInsideContainerStorefront(containerTargetType.role, containerTargetIndex, contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeStorefront"/>
884884
</actionGroup>
885885
</actionGroups>

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
</actionGroup>
2424
<actionGroup name="dragColumnToAnotherColumnGroup">
2525
<arguments>
26-
<argument name="contentBlockType" defaultValue="PageBuilderColumnContentBlock"/>
27-
<argument name="contentBlockIndex" defaultValue="1" type="string"/>
28-
<argument name="containerTargetType" defaultValue="PageBuilderColumnContentBlock"/>
26+
<argument name="contentType" defaultValue="PageBuilderColumnContentType"/>
27+
<argument name="contentTypeIndex" defaultValue="1" type="string"/>
28+
<argument name="containerTargetType" defaultValue="PageBuilderColumnContentType"/>
2929
<argument name="containerTargetIndex" defaultValue="1" type="string"/>
3030
</arguments>
31-
<waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForContentBlockInStageVisible"/>
32-
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" x="10" y="0" stepKey="onMouseOverContentBlockStage"/>
31+
<waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeInStageVisible"/>
32+
<moveMouseOver selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" x="10" y="0" stepKey="onMouseOverContentTypeStage"/>
3333
<waitForPageLoad time="30" stepKey="waitForMouseOverAnimation"/>
34-
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenuByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForOptions"/>
35-
<waitForElementVisible selector="{{PageBuilderColumnSection.columnMoveByIndex(contentBlockIndex)}}" stepKey="waitForMoveHandle"/>
36-
<dragAndDrop selector1="{{PageBuilderColumnSection.columnMoveByIndex(contentBlockIndex)}}" selector2="{{PageBuilderActionsSection.contentBlockContainer(contentBlockType.role, containerTargetIndex)}}" stepKey="moveContentTypeIntoContainer"/>
34+
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeOptionsMenuByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForOptions"/>
35+
<waitForElementVisible selector="{{PageBuilderColumnSection.columnMoveByIndex(contentTypeIndex)}}" stepKey="waitForMoveHandle"/>
36+
<dragAndDrop selector1="{{PageBuilderColumnSection.columnMoveByIndex(contentTypeIndex)}}" selector2="{{PageBuilderActionsSection.contentTypeContainer(contentType.role, containerTargetIndex)}}" stepKey="moveContentTypeIntoContainer"/>
3737
</actionGroup>
3838
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Data/ContentTypeData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<entity name="PageBuilderStage" type="pagebuilder_content_type">
1616
<data key="role">stage</data>
1717
</entity>
18-
<entity name="PageBuilderRowContentBlock" type="pagebuilder_content_type">
18+
<entity name="PageBuilderRowContentType" type="pagebuilder_content_type">
1919
<data key="name">Row</data>
2020
<data key="section">General</data>
2121
<data key="role">row</data>

0 commit comments

Comments
 (0)