Skip to content

Commit 839d93a

Browse files
author
Cari Spruiell
committed
Merge remote-tracking branch 'origin/MAGETWO-87048-Extensible-Grid-System' into MAGETWO-87048-Extensible-Grid-System
2 parents 0f0d22a + c4bc2df commit 839d93a

File tree

7 files changed

+29
-23
lines changed

7 files changed

+29
-23
lines changed

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

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,6 @@
291291
<actionGroup ref="dragContentTypeToStage" stepKey="dragAdditionalRow">
292292
<argument name="contentType" value="PageBuilderRowContentType"/>
293293
</actionGroup>
294-
<actionGroup ref="dragContentTypeToStage" stepKey="dragAdditionalRow2">
295-
<argument name="contentType" value="PageBuilderRowContentType"/>
296-
</actionGroup>
297294
<actionGroup ref="dragContentTypeToContainer" stepKey="dragColumnIntoStage">
298295
<argument name="contentType" value="PageBuilderColumnContentType"/>
299296
<argument name="containerTargetType" value="PageBuilderRowContentType"/>
@@ -324,6 +321,7 @@
324321
<!-- Close grid form and check options are restored -->
325322
<comment userInput="Close grid form and check options are restored" stepKey="commentCloseAndValidateOptionsAreRestored"/>
326323
<actionGroup ref="closeGridSizeForm" stepKey="closeGridForm" />
324+
<scrollTo selector="{{CmsNewPagePageActionsSection.pageTitle}}" stepKey="scrollToTop"/>
327325
<moveMouseOver selector="{{PageBuilderActionsSection.contentTypeInStage(PageBuilderRowContentType.role)}}" x="10" y="0" stepKey="onMouseOverContentTypeStage"/>
328326
<waitForPageLoad stepKey="waitForPageLoad"/>
329327
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeOptionsMenu(PageBuilderRowContentType.role)}}" stepKey="waitForOptions"/>
@@ -438,14 +436,23 @@
438436
</actionGroup>
439437
<seeNumberOfElements selector="{{PageBuilderColumnSection.allColumns}}" userInput="3" stepKey="seeNumberOfColumnsStill3"/>
440438
<actionGroup ref="closeGridSizeForm" stepKey="closeGridSizeForm"/>
439+
<!-- Verify Initial Column Sizes -->
440+
<comment userInput="Verify Initial Column Sizes " stepKey="context0"/>
441+
<seeElement selector="{{PageBuilderColumnSection.displayLabel('1','2/7')}}" stepKey="checkWidthFirstColumn"/>
442+
<seeElement selector="{{PageBuilderColumnSection.displayLabel('2','2/7')}}" stepKey="checkWidthSecondColumn"/>
443+
<seeElement selector="{{PageBuilderColumnSection.displayLabel('3','3/7')}}" stepKey="checkWidthThirdColumn"/>
441444
<!-- Grab grid guide location for column 1 -->
442-
<comment userInput="Grab grid guide width" stepKey="context0"/>
443-
<executeJS function="return document.querySelector('{{PageBuilderColumnSection.columnResizeGridLine('5')}}').clientWidth" stepKey="guideWidth"/>
445+
<comment userInput="Grab grid guide width" stepKey="context1"/>
446+
<executeJS function="return document.querySelector('{{PageBuilderColumnSection.columnResizeGridLine('1')}}').clientWidth" stepKey="guideWidth"/>
444447
<!-- Resize Column 1 -->
445-
<comment userInput="Resize Column 1" stepKey="comment1"/>
446-
<dragAndDrop selector1="{{PageBuilderColumnSection.columnX('1')}} {{PageBuilderColumnSection.columnResizeHandle}}" selector2="{{PageBuilderColumnSection.columnResizeGridLine('5')}}" x="$guideWidth" stepKey="resizeColumn1"/>
448+
<comment userInput="Resize Column 1" stepKey="context2"/>
449+
<dragAndDrop selector1="{{PageBuilderColumnSection.columnX('1')}} {{PageBuilderColumnSection.columnResizeHandle}}" selector2="{{PageBuilderColumnSection.columnResizeGridLine('1')}}" x="$guideWidth" stepKey="resizeColumn1"/>
447450
<seeNumberOfElements selector="{{PageBuilderColumnSection.allColumns}}" userInput="3" stepKey="seeNumberOfColumnsStill32"/>
448-
<seeElement selector="{{PageBuilderColumnSection.displayLabel('1','5/7')}}" stepKey="checkWidthFirstColumn"/>
451+
<!-- Verify New Column Sizes -->
452+
<comment userInput="Verify New Column Sizes " stepKey="context3"/>
453+
<seeElement selector="{{PageBuilderColumnSection.displayLabel('1','1/7')}}" stepKey="checkWidthFirstColumn2"/>
454+
<seeElement selector="{{PageBuilderColumnSection.displayLabel('2','3/7')}}" stepKey="checkWidthSecondColumn2"/>
455+
<seeElement selector="{{PageBuilderColumnSection.displayLabel('3','3/7')}}" stepKey="checkWidthThirdColumn2"/>
449456
</test>
450457
<test name="ValidateResizeHistory">
451458
<annotations>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,6 @@
729729
<argument name="contentType" value="PageBuilderColumnContentType"/>
730730
<argument name="contentTypeNumber" value="1"/>
731731
</actionGroup>
732-
<actionGroup ref="confirmRemovalModal" stepKey="confirmRemovalModal"/>
733732
<actionGroup ref="dragContentTypeToContainer" stepKey="dragIntoStage1">
734733
<argument name="contentType" value="PageBuilderDividerContentType"/>
735734
<argument name="containerTargetType" value="PageBuilderColumnContentType"/>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
</actionGroup>
8787
<seeNumberOfElements selector="{{PageBuilderColumnSection.columnGroupColumns('1')}}" userInput="1" stepKey="seeOneColumnInGroup" />
8888
<!-- As the removal of the first column caused this ones width to change we have to confirm the removal -->
89-
<actionGroup ref="removeContentTypeFromStage" stepKey="removeColumn2">
89+
<actionGroup ref="removeEmptyContentTypeFromStage" stepKey="removeColumn2">
9090
<argument name="contentType" value="PageBuilderColumnContentType"/>
9191
</actionGroup>
9292
<dontSeeElement selector="{{PageBuilderColumnSection.column}}" stepKey="dontSeeColumn"/>
@@ -927,7 +927,7 @@
927927
<waitForElementVisible selector="{{PageBuilderColumnSection.columnStyle(PageBuilderFirstColumnInStage.index, PageBuilderColumnStyles.widthOneTwelfth)}}" stepKey="seeFirstColumnWidth"/>
928928
<seeElement selector="{{PageBuilderColumnSection.columnStyle(PageBuilderSecondColumnInStage.index, PageBuilderColumnStyles.widthFiveTwelfth)}}" stepKey="seeSecondColumnWidth"/>
929929
<seeElement selector="{{PageBuilderColumnSection.columnStyle(PageBuilderThirdColumnInStage.index, PageBuilderColumnStyles.widthHalf)}}" stepKey="seeThirdColumnWidth"/>
930-
<actionGroup ref="removeContentTypeFromStage" stepKey="removeColumn1">
930+
<actionGroup ref="removeEmptyContentTypeFromStage" stepKey="removeColumn1">
931931
<argument name="contentType" value="PageBuilderColumnContentType"/>
932932
</actionGroup>
933933
<waitForElementVisible selector="{{PageBuilderColumnSection.columnStyle(PageBuilderFirstColumnInStage.index, PageBuilderColumnStyles.widthHalf)}}" stepKey="seeFirstColumnWidthDistributed"/>

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/column-group/preview.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/column/resize.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/column-group/preview.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {default as ColumnGroupPreview} from "../column-group/preview";
2121
import BindResizeHandleEventParamsInterface from "../column/bind-resize-handle-event-params";
2222
import InitElementEventParamsInterface from "../column/init-element-event-params";
2323
import ColumnPreview from "../column/preview";
24-
import ResizeUtils, {
24+
import Resize, {
2525
comparator, determineMaxGhostWidth, getAdjacentColumn, getColumnIndexInGroup,
2626
getRoundedColumnWidth, updateColumnWidth,
2727
} from "../column/resize";
@@ -73,7 +73,7 @@ export default class Preview extends PreviewCollection {
7373
private dropPosition: DropPosition;
7474
private movePosition: DropPosition;
7575
private groupPositionCache: GroupPositionCache;
76-
private resizeUtils: ResizeUtils;
76+
private resizeUtils: Resize;
7777
private gridSizeHistory: Map<number, number[]> = new Map();
7878

7979
/**
@@ -88,7 +88,7 @@ export default class Preview extends PreviewCollection {
8888
observableUpdater: ObservableUpdater,
8989
) {
9090
super(parent, config, observableUpdater);
91-
this.resizeUtils = new ResizeUtils(this.parent);
91+
this.resizeUtils = new Resize(this.parent);
9292

9393
// Keep track of the grid size in an observable
9494
this.parent.dataStore.subscribe((state: DataObject) => {
@@ -131,9 +131,9 @@ export default class Preview extends PreviewCollection {
131131
/**
132132
* Retrieve the resize utils
133133
*
134-
* @returns {ResizeUtils}
134+
* @returns {Resize}
135135
*/
136-
public getResizeUtils(): ResizeUtils {
136+
public getResizeUtils(): Resize {
137137
return this.resizeUtils;
138138
}
139139

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/column/resize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {outwardSearch} from "../../utils/array";
88
import {ColumnWidth, GroupPositionCache, MaxGhostWidth, ResizeHistory} from "../column-group/preview";
99
import ColumnPreview from "./preview";
1010

11-
export default class ResizeUtils {
11+
export default class Resize {
1212
private columnGroup: ContentTypeCollectionInterface;
1313

1414
constructor(columnGroup: ContentTypeCollectionInterface) {

0 commit comments

Comments
 (0)