Skip to content

Commit 99f2c4e

Browse files
author
Michael Yu
committed
MAGETWO-91307: Clean up typescript errors
- Rename Content, ContentCollection to Master, MasterCollection - Renamed block in tests, folder structures, and classes
1 parent d2cc570 commit 99f2c4e

File tree

190 files changed

+4121
-4112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+4121
-4112
lines changed

app/code/Magento/PageBuilder/Model/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function getGroups()
4141
}
4242

4343
/**
44-
* Return all content blocks
44+
* Return all content types
4545
*
4646
* @return array|mixed|null
4747
*/

app/code/Magento/PageBuilder/Model/ContentBlock/DataProvider.php renamed to app/code/Magento/PageBuilder/Model/ContentType/DataProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\PageBuilder\Model\ContentBlock;
6+
namespace Magento\PageBuilder\Model\ContentType;
77

88
/**
99
* We populate our forms in the browser using JavaScript

app/code/Magento/PageBuilder/Model/Stage/Config.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class Config
1111
{
1212
const DEFAULT_PREVIEW_COMPONENT = 'Magento_PageBuilder/js/content-type/preview';
13-
const DEFAULT_CONTENT_COMPONENT = 'Magento_PageBuilder/js/content-type/content';
13+
const DEFAULT_MASTER_COMPONENT = 'Magento_PageBuilder/js/content-type/master';
1414

1515
/**
1616
* @var \Magento\PageBuilder\Model\Config\ConfigInterface
@@ -77,7 +77,7 @@ public function getConfig()
7777
}
7878

7979
/**
80-
* Retrieve the content block groups
80+
* Retrieve the content type groups
8181
*
8282
* @return array
8383
*/
@@ -87,27 +87,27 @@ private function getGroups()
8787
}
8888

8989
/**
90-
* Build up the content block data
90+
* Build up the content type data
9191
*
9292
* @return array
9393
*/
9494
private function getContentTypes()
9595
{
9696
$contentTypes = $this->config->getContentTypes();
9797

98-
$contentBlockData = [];
98+
$contentTypeData = [];
9999
foreach ($contentTypes as $name => $contentType) {
100-
$contentBlockData[$name] = $this->flattenContentTypeData(
100+
$contentTypeData[$name] = $this->flattenContentTypeData(
101101
$name,
102102
$contentType
103103
);
104104
}
105105

106-
return $contentBlockData;
106+
return $contentTypeData;
107107
}
108108

109109
/**
110-
* Flatten the content block data
110+
* Flatten the content type data
111111
*
112112
* @param $name
113113
* @param $contentType
@@ -135,9 +135,9 @@ private function flattenContentTypeData($name, $contentType)
135135
'preview_component' => (isset($contentType['preview_component'])
136136
? $contentType['preview_component']
137137
: self::DEFAULT_PREVIEW_COMPONENT),
138-
'content_component' => (isset($contentType['content_component'])
139-
? $contentType['content_component']
140-
: self::DEFAULT_CONTENT_COMPONENT),
138+
'master_component' => (isset($contentType['master_component'])
139+
? $contentType['master_component']
140+
: self::DEFAULT_MASTER_COMPONENT),
141141
'allowed_parents' => isset($contentType['allowed_parents']) ? $contentType['allowed_parents'] : [],
142142
'readers' => isset($contentType['readers']) ? $contentType['readers'] : [],
143143
'appearances' => isset($contentType['appearances']) ? $contentType['appearances'] : [],

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

Lines changed: 111 additions & 111 deletions
Large diffs are not rendered by default.

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="openPageBuilderEditPanelSmallByIndex">
1212
<arguments>
13-
<argument name="contentBlockType" defaultValue=""/>
14-
<argument name="contentBlockIndex" defaultValue="1" type="string"/>
13+
<argument name="contentType" defaultValue=""/>
14+
<argument name="contentTypeIndex" defaultValue="1" type="string"/>
1515
</arguments>
16-
<waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForButtonElement"/>
17-
<click selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="clickButtonElement"/>
16+
<waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForButtonElement"/>
17+
<click selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="clickButtonElement"/>
1818
<waitForPageLoad stepKey="waitForPageLoad"/>
19-
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenuByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForOptions"/>
20-
<waitForElementVisible selector="{{PageBuilderActionsSection.contentBlockEditByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForEditButton"/>
21-
<click selector="{{PageBuilderActionsSection.contentBlockEditByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="clickEditButton"/>
19+
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeOptionsMenuByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForOptions"/>
20+
<waitForElementVisible selector="{{PageBuilderActionsSection.contentTypeEditByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForEditButton"/>
21+
<click selector="{{PageBuilderActionsSection.contentTypeEditByIndex(contentType.role, contentTypeIndex)}}" stepKey="clickEditButton"/>
2222
<waitForElementVisible time="5" selector="{{PageBuilderActionsSection.editForm}}" stepKey="waitForEditForm"/>
2323
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
24-
<see userInput="Edit {{contentBlockType.name}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentBlockNameInEditFormTitle"/>
24+
<see userInput="Edit {{contentType.name}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentTypeNameInEditFormTitle"/>
2525
<waitForPageLoad stepKey="waitForPageLoad2"/>
2626
</actionGroup>
2727
<actionGroup name="addButton">
@@ -30,9 +30,9 @@
3030
</arguments>
3131
<comment userInput="Adding Button" stepKey="comment"/>
3232
<executeJS function="return Math.round(document.getElementsByClassName('pagebuilder-button-item').length+1)" stepKey="initialNumberOfButtonsPlusOne"/>
33-
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(PageBuilderButtonsContentBlock.role, buttonGroupIndex)}}" stepKey="mouseOverButtonsGroup"/>
33+
<moveMouseOver selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(PageBuilderButtonsContentType.role, buttonGroupIndex)}}" stepKey="mouseOverButtonsGroup"/>
3434
<waitForPageLoad stepKey="waitForPageLoad"/>
35-
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenu(PageBuilderButtonsContentBlock.role)}}" stepKey="waitForOptionsMenu"/>
35+
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeOptionsMenu(PageBuilderButtonsContentType.role)}}" stepKey="waitForOptionsMenu"/>
3636
<waitForElementVisible time="10" selector="{{ButtonGroupOnStage.addNewButtonItemOption(buttonGroupIndex)}}" stepKey="seeAddButton"/>
3737
<click selector="{{ButtonGroupOnStage.addNewButtonItemOption(buttonGroupIndex)}}" stepKey="clickAddButton"/>
3838
<waitForPageLoad stepKey="waitForPageLoad2"/>
@@ -42,17 +42,17 @@
4242
<actualResult type="variable">numberOfButtonsAfterAdd</actualResult>
4343
</assertEquals>
4444
</actionGroup>
45-
<actionGroup name="removeContentBlockFromStageSmallByIndex">
45+
<actionGroup name="removeContentTypeFromStageSmallByIndex">
4646
<arguments>
47-
<argument name="contentBlockType" defaultValue=""/>
48-
<argument name="contentBlockIndex" defaultValue="2" type="string"/>
47+
<argument name="contentType" defaultValue=""/>
48+
<argument name="contentTypeIndex" defaultValue="2" type="string"/>
4949
</arguments>
50-
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForButtonElement"/>
51-
<click selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="clickButtonElement"/>
50+
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForButtonElement"/>
51+
<click selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="clickButtonElement"/>
5252
<waitForPageLoad stepKey="waitForPageLoad"/>
53-
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenuByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForOptions"/>
54-
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockRemoveByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="waitForRemoveButton"/>
55-
<click selector="{{PageBuilderActionsSection.contentBlockRemoveByIndex(contentBlockType.role, contentBlockIndex)}}" stepKey="clickRemoveContentBlock"/>
53+
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeOptionsMenuByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForOptions"/>
54+
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeRemoveByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForRemoveButton"/>
55+
<click selector="{{PageBuilderActionsSection.contentTypeRemoveByIndex(contentType.role, contentTypeIndex)}}" stepKey="clickRemoveContentType"/>
5656
<waitForPageLoad stepKey="waitForPageLoad2"/>
5757
</actionGroup>
5858
<actionGroup name="validateButtonItemContent">

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="openPageBuilderEditColumnPanel">
1212
<moveMouseOver selector="{{PageBuilderColumnSection.columnInStage}}" x="10" y="0" stepKey="onMouseOverColumn"/>
13-
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenu('column')}}" stepKey="waitForOptions" />
13+
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeOptionsMenu('column')}}" stepKey="waitForOptions" />
1414
<click selector="{{PageBuilderColumnSection.editColumn}}" stepKey="clickEditColumn"/>
1515
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
1616
<waitForElementVisible selector="{{PageBuilderActionsSection.editForm}}" stepKey="waitForEditForm"/>
17-
<see userInput="Edit Column" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentBlockNameInEditFormTitle"/>
17+
<see userInput="Edit Column" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentTypeNameInEditFormTitle"/>
1818
</actionGroup>
1919
<actionGroup name="dragPageBuilderColumnIntoStage">
2020
<dragAndDrop selector1="{{PageBuilderColumnSection.draggableColumnInPanel}}" selector2="{{PageBuilderColumnSection.dropAreaInDefaultStage}}" stepKey="dropColumnIntoStage"/>

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,40 @@
1818
</actionGroup>
1919
<actionGroup name="openSlideOptions">
2020
<comment userInput="Open slide options" stepKey="commentOpen"/>
21-
<waitForElementVisible time="10" selector="{{SliderInAdmin.sliderContainer}}" stepKey="waitForContentBlockInStageVisible" />
21+
<waitForElementVisible time="10" selector="{{SliderInAdmin.sliderContainer}}" stepKey="waitForContentTypeInStageVisible" />
2222
<click stepKey="clickNavigationDot" selector="{{SliderInAdmin.firstSlideNavigationDot}}"/>
2323
<waitForElementVisible selector="{{SliderInAdmin.slideOptionsEdit}}" stepKey="waitForSlideOptionsEdit"/>
24-
<click selector="{{SliderInAdmin.slideOptionsEdit}}" stepKey="clickEditContentBlock"/>
24+
<click selector="{{SliderInAdmin.slideOptionsEdit}}" stepKey="clickEditContentType"/>
2525
<waitForLoadingMaskToDisappear stepKey="waitForAnimation" />
2626
<waitForElementVisible time="5" selector="{{PageBuilderActionsSection.editForm}}" stepKey="waitForEditForm" />
27-
<see userInput="Edit Slide" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentBlockNameInEditFormTitle"/>
27+
<see userInput="Edit Slide" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentTypeNameInEditFormTitle"/>
2828
</actionGroup>
2929
<actionGroup name="openSlideOptionsByIndex">
3030
<arguments>
3131
<argument name="index" defaultValue="1" type="string"/>
3232
</arguments>
3333
<comment userInput="Open slide options by index" stepKey="commentOpenByIndex"/>
34-
<waitForElementVisible time="10" selector="{{SliderInAdmin.sliderContainer}}" stepKey="waitForContentBlockInStageVisible" />
34+
<waitForElementVisible time="10" selector="{{SliderInAdmin.sliderContainer}}" stepKey="waitForContentTypeInStageVisible" />
3535
<click stepKey="clickNavigationDot" selector="{{SliderInAdmin.slideNavigationDot(index)}}"/>
3636
<waitForElementVisible selector="{{SliderInAdmin.slideOptionsEdit}}" stepKey="waitForSlideOptionsEdit"/>
37-
<click selector="{{SliderInAdmin.slideOptionsEdit}}" stepKey="clickEditContentBlock"/>
37+
<click selector="{{SliderInAdmin.slideOptionsEdit}}" stepKey="clickEditContentType"/>
3838
<waitForLoadingMaskToDisappear stepKey="waitForAnimation" />
3939
<waitForElementVisible time="5" selector="{{PageBuilderActionsSection.editForm}}" stepKey="waitForEditForm" />
40-
<see userInput="Edit Slide" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentBlockNameInEditFormTitle"/>
40+
<see userInput="Edit Slide" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentTypeNameInEditFormTitle"/>
4141
</actionGroup>
4242
<actionGroup name="removeSlide">
43-
<waitForElementVisible time="10" selector="{{SliderInAdmin.sliderContainer}}" stepKey="waitForContentBlockInStageVisible" />
43+
<waitForElementVisible time="10" selector="{{SliderInAdmin.sliderContainer}}" stepKey="waitForContentTypeInStageVisible" />
4444
<click selector="{{SliderInAdmin.activeSlideNavigationDot}}" stepKey="clickActiveSlideNavigationDot"/>
45-
<seeElement selector="{{SliderInAdmin.slideOptions}}" stepKey="seeContentBlockOptionsMenu"/>
46-
<click selector="{{SliderInAdmin.slideOptionsRemove}}" stepKey="clickRemoveContentBlock"/>
45+
<seeElement selector="{{SliderInAdmin.slideOptions}}" stepKey="seeContentTypeOptionsMenu"/>
46+
<click selector="{{SliderInAdmin.slideOptionsRemove}}" stepKey="clickRemoveContentType"/>
4747
</actionGroup>
4848
<actionGroup name="addSlide">
49-
<waitForElementVisible time="10" selector="{{SliderInAdmin.sliderContainer}}" stepKey="waitForContentBlockInStageVisible" />
49+
<waitForElementVisible time="10" selector="{{SliderInAdmin.sliderContainer}}" stepKey="waitForContentTypeInStageVisible" />
5050
<click stepKey="focusOnSlider" selector="{{SliderInAdmin.sliderContainer}}"/>
5151
<scrollTo selector="div.pagebuilder-header" x="0" y="-100" stepKey="scrollToTop"/>
52-
<moveMouseOver selector="{{SliderInAdmin.sliderContainer}}" x="10" y="10" stepKey="onMouseOverContentBlockStage"/>
52+
<moveMouseOver selector="{{SliderInAdmin.sliderContainer}}" x="10" y="10" stepKey="onMouseOverContentTypeStage"/>
5353
<wait time="0.5" stepKey="waitForMouseOverAnimation" />
54-
<waitForElementVisible time="5" selector="{{SliderInAdmin.sliderOptions}}" stepKey="seeContentBlockOptionsMenu"/>
54+
<waitForElementVisible time="5" selector="{{SliderInAdmin.sliderOptions}}" stepKey="seeContentTypeOptionsMenu"/>
5555
<moveMouseOver selector="{{SliderInAdmin.sliderOptions}}" stepKey="onMouseOverOptionsMenu"/>
5656
<click selector="{{SliderInAdmin.addNewSlide}}" stepKey="clickAddNewSlideChild"/>
5757
<waitForLoadingMaskToDisappear stepKey="waitForAnimation"/>

0 commit comments

Comments
 (0)