Skip to content

Commit 7fe5400

Browse files
committed
PB-108 fix MFTF tests
1 parent 5e32631 commit 7fe5400

File tree

2 files changed

+32
-54
lines changed

2 files changed

+32
-54
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderColumnLineTest/ColumnLineMoveColumnTest.xml

Lines changed: 32 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -44,69 +44,49 @@
4444
</actionGroup>
4545
<waitForElementVisible selector="{{ColumnOnBackend.displayLabel('1','3/12')}}" stepKey="findAfterDuplicateLabelColumn1"/>
4646
<waitForElementVisible selector="{{ColumnOnBackend.displayLabel('2','3/12')}}" stepKey="findAfterDuplicateLabelColumn2"/>
47-
<!-- Drop new Column Line -->
48-
<actionGroup ref="dragNewColumnToNewColumnLine" stepKey="createSecondColumnLine">
49-
<argument name="targetColumnLineSelector" value="{{ColumnLineOnBackend.bottomDropPlaceHolder('1')}}"/>
50-
</actionGroup>
51-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2' ,'1','6/12')}}" stepKey="findSecondColumnLineColumn1"/>
52-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','2','6/12')}}" stepKey="findSecondColumnLineColumn2"/>
53-
<!-- Drag column from column line 1 to column line 2 -->
54-
<actionGroup ref="dragExistingColumnToExistingColumnLine" stepKey="moveColumnToColumnLine2">
55-
<argument name="containerColumnLineIndex" value="2"/>
56-
<argument name="columnIndexInNewLine" value="1" />
57-
<argument name="columnIndex" value="2" />
58-
</actionGroup>
59-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('1' ,'1','3/12')}}" stepKey="findFirstColumnLineColumn1AftermoveColumnToColumnLine2"/>
60-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('1','2','9/12')}}" stepKey="findFirstColumnLineColumn2AftermoveColumnToColumnLine2"/>
61-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','1','3/12')}}" stepKey="findSecondColumnLineColumn1AftermoveColumnToColumnLine2"/>
62-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','2','3/12')}}" stepKey="findSecondColumnLineColumn2AftermoveColumnToColumnLine2"/>
63-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','3','6/12')}}" stepKey="findSecondColumnLineColumn3AftermoveColumnToColumnLine2"/>
64-
<!-- Drag Column Group 2 to stage -->
65-
<actionGroup ref="dragContentTypeToStage" stepKey="dragColumnGroup2ToRootContainer">
47+
<!-- Drop new Column Group -->
48+
<actionGroup ref="dragContentTypeNextToExistingContentType" stepKey="dragColumnGroup2ToRootContainer">
6649
<argument name="contentType" value="PageBuilderColumnGroupContentType"/>
67-
<argument name="containerTargetType" value="PageBuilderRootContainerContentType"/>
50+
<argument name="existingContentType" value="PageBuilderColumnGroupContentType"/>
51+
<argument name="contentTypeIndex" value="2"/>
6852
</actionGroup>
69-
<!-- Drag Column 1 from Column Group 2 and Drop in Column Group 1, New First Column Line -->
70-
<actionGroup ref="dragExistingColumnToNewColumnLine" stepKey="moveColumnCG2CL1ToCG1ColumnLine2">
71-
<argument name="newColumnLineIndexExpected" value="1"/>
72-
<argument name="targetColumnLineSelector" value="{{ColumnLineOnBackend.topDropPlaceHolder('1')}}"/>
73-
<argument name="columnIndex" value="6" />
74-
<argument name="offsetYCoordinate" value="10"/>
53+
<!-- <waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2' ,'1','6/12')}}" stepKey="findSecondColumnLineColumn1"/>
54+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','2','6/12')}}" stepKey="findSecondColumnLineColumn2"/> -->
55+
<!-- Drag column from CG2 to CG1 -->
56+
<actionGroup ref="dragExistingColumnToExistingColumnLine" stepKey="moveColumnToCG1ColumnLine1">
57+
<argument name="containerColumnGroupIndex" value="1"/>
58+
<argument name="containerColumnLineIndex" value="1"/>
59+
<argument name="columnIndexInNewLine" value="1" />
60+
<argument name="columnIndex" value="3" />
7561
</actionGroup>
76-
<!-- Verify Column Widths-->
77-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('1' ,'1','12/12')}}" stepKey="findFirstColumnLineColumn1AfterMoveColumnCG2CL1ToCG1ColumnLine2"/>
78-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','1','3/12')}}" stepKey="findSecondColumnLineColumn1AfterMoveColumnCG2CL1ToCG1ColumnLine2"/>
79-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','2','9/12')}}" stepKey="findSecondColumnLineColumn2AfterMoveColumnCG2CL1ToCG1ColumnLine2"/>
80-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('3','1','3/12')}}" stepKey="findThirdColumnLineColumn1AfterMoveColumnCG2CL1ToCG1ColumnLine2"/>
81-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('3','2','3/12')}}" stepKey="findThirdColumnLineColumn2AfterMoveColumnCG2CL1ToCG1ColumnLine2"/>
82-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('3','3','6/12')}}" stepKey="findThirdColumnLineColumn3AfterMoveColumnCG2CL1ToCG1ColumnLine2"/>
83-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('4','1','12/12')}}" stepKey="findCG2FirstColumnLineColumn1AfterMoveColumnCG2CL1ToCG1ColumnLine2"/>
84-
<!-- Drag Column 1, Column Line 3, Column Group 1 to Column Group 2, Column Line 1 -->
85-
<actionGroup ref="dragExistingColumnToExistingColumnLine" stepKey="moveColumnCG1CL3C1ToCG2CL1C1">
62+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('1' ,'1','3/12')}}" stepKey="findFirstColumnLineColumn1AftermoveColumn"/>
63+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('1','2','3/12')}}" stepKey="findFirstColumnLineColumn2AftermoveColumn"/>
64+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('1','3','6/12')}}" stepKey="findFirstColumnLineColumn3AftermoveColumn"/>
65+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','1','6/12')}}" stepKey="findSecondColumnLineColumn1AftermoveColumn"/>
66+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','2','6/12')}}" stepKey="findSecondColumnLineColumn2AftermoveColumn"/>
67+
<!-- Drag column from CG1 to CG2 -->
68+
<actionGroup ref="dragExistingColumnToExistingColumnLine" stepKey="moveColumnToCG2ColumnLine1">
8669
<argument name="containerColumnGroupIndex" value="2"/>
8770
<argument name="containerColumnLineIndex" value="1"/>
8871
<argument name="columnIndexInNewLine" value="1" />
89-
<argument name="columnIndex" value="4" />
72+
<argument name="columnIndex" value="1" />
9073
</actionGroup>
91-
<!-- Verify Column Widths-->
92-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('1' ,'1','12/12')}}" stepKey="findFirstColumnLineColumn1AfterMoveColumnCG1CL3C1ToCG2CL1C1"/>
93-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','1','3/12')}}" stepKey="findSecondColumnLineColumn1AfterMoveColumnCG1CL3C1ToCG2CL1C1"/>
94-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','2','9/12')}}" stepKey="findSecondColumnLineColumn2AfterMoveColumnCG1CL3C1ToCG2CL1C1"/>
95-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('3','1','6/12')}}" stepKey="findThirdColumnLineColumn1AfterMoveColumnCG1CL3C1ToCG2CL1C1"/>
96-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('3','2','6/12')}}" stepKey="findThirdColumnLineColumn2AfterMoveColumnCG1CL3C1ToCG2CL1C1"/>
97-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('4','1','3/12')}}" stepKey="findCG2FirstColumnLineColumn1AfterMoveColumnCG1CL3C1ToCG2CL1C1"/>
98-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('4','2','9/12')}}" stepKey="findCG2FirstColumnLineColumn2AfterMoveColumnCG1CL3C1ToCG2CL1C1"/>
74+
75+
76+
<executeJS function="return document.querySelector('{{ColumnOnBackend.columnResizeGridLine('4')}}').clientWidth" stepKey="guideWidth"/>
77+
<dragAndDrop selector1="{{ColumnOnBackend.columnX('1')}} {{ColumnOnBackend.columnResizeHandle}}" selector2="{{ColumnOnBackend.columnResizeGridLine('4')}}" x="$guideWidth" stepKey="resizeColumnTwo"/>
78+
<waitForPageLoad stepKey="waitForDragAndDrop"/>
79+
9980
<!-- save page -->
10081
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitSecondTimePageBuilderFullScreen"/>
10182
<actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="saveSecondTimeAndContinueEditCmsPage"/>
10283
<actionGroup ref="switchToPageBuilderStage" stepKey="switchSecondTimeToPageBuilderStage"/>
10384
<!-- Verify Column Widths in stage after save-->
104-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('1' ,'1','12/12')}}" stepKey="findFirstColumnLineColumn1AfterPageSave"/>
105-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','1','3/12')}}" stepKey="findSecondColumnLineColumn1AfterPageSave"/>
106-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','2','9/12')}}" stepKey="findSecondColumnLineColumn2AfterPageSave"/>
107-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('3','1','6/12')}}" stepKey="findThirdColumnLineColumn1AfterPageSave"/>
108-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('3','2','6/12')}}" stepKey="findThirdColumnLineColumn2AfterPageSave"/>
109-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('4','1','3/12')}}" stepKey="findCG2FirstColumnLineColumn1AfterPageSave"/>
110-
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('4','2','9/12')}}" stepKey="findCG2FirstColumnLineColumn2AfterPageSave"/>
85+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('1','1','4/12')}}" stepKey="verifyFirstColumnLineColumn1AftermoveColumnToCG2ColumnLine1"/>
86+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('1','2','8/12')}}" stepKey="verifyFirstColumnLineColumn2AftermoveColumnToCG2ColumnLine1"/>
87+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','1','3/12')}}" stepKey="verifySecondColumnLineColumn1AftermoveColumnToCG2ColumnLine1"/>
88+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2' ,'2','3/12')}}" stepKey="verifySecondColumnLineColumn2AftermoveColumnToCG2ColumnLine1"/>
89+
<waitForElementVisible selector="{{ColumnLineOnBackend.childColumnDisplayLabel('2','3','6/12')}}" stepKey="verifySecondColumnLineColumn3AftermoveColumnToCG2ColumnLine1"/>
11190
</test>
11291
</tests>
92+

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/column-line/default/preview.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<div class="column-drop-placeholder"
1111
afterRender="function (element) { bindColumnLineDropPlaceholder.call($data, element); }">
1212
</div>
13-
<div class="top-dropper"></div>
1413
<div class="resize-ghost" afterRender="function (element) { bindGhost.call($data, element); }"></div>
1514
<div class="drop-placeholder" afterRender="function (element) { bindDropPlaceholder.call($data, element); }"></div>
1615
<div class="move-placeholder" afterRender="function (element) { bindMovePlaceholder.call($data, element); }"></div>
@@ -19,7 +18,6 @@
1918
afterRender="function (element) { bindInteractions.call($data, element); }">
2019
<render args="{name: preview.template, data: preview}"></render>
2120
</div>
22-
<div class="bottom-dropper"></div>
2321
<div class="bottom-drop-placeholder"
2422
afterRender="function (element) { bindColumnLineBottomDropPlaceholder.call($data, element); }" >
2523
</div>

0 commit comments

Comments
 (0)