Skip to content

Commit e6371fa

Browse files
author
Hwashiang Yu
committed
MC-5810: Improve naming of the critical variables/parameters in the code and configuration
- Contextualized parent in components - Resolved minor test generation failure
1 parent 165150c commit e6371fa

File tree

106 files changed

+769
-758
lines changed

Some content is hidden

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

106 files changed

+769
-758
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderDataGridSection.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="PageBuilderDataGrid">
12-
<element name="emptyGridMessage" type="text" selector="//table[@data-content-type='grid']//td[@class='pagebuilder-empty-dynamic-row' and @align='center' and .='{{arg1}}']" parameterized="true"/>
13-
<element name="gridBase" type="text" selector="//table[@data-content-type='grid']"/>
14-
<element name="gridColumnHeader" type="text" selector="//table[@data-content-type='grid']//thead//th[{{arg1}}]//span[.='{{arg2}}']" parameterized="true"/>
12+
<element name="emptyGridMessage" type="text" selector="//table[@data-role='grid']//td[@class='pagebuilder-empty-dynamic-row' and @align='center' and .='{{arg1}}']" parameterized="true"/>
13+
<element name="gridBase" type="text" selector="//table[@data-role='grid']"/>
14+
<element name="gridColumnHeader" type="text" selector="//table[@data-role='grid']//thead//th[{{arg1}}]//span[.='{{arg2}}']" parameterized="true"/>
1515
<element name="gridPagination" type="text" selector=".admin__data-grid-pager"/>
1616
<element name="gridPaginationLeftButton" type="button" selector=".admin__data-grid-pager button.action-previous"/>
1717
<element name="gridPaginationRightButton" type="button" selector=".admin__data-grid-pager button.action-next"/>
1818
<element name="gridPaginationPage" type="input" selector=".admin__data-grid-pager input.admin__control-text"/>
1919
<element name="gridPaginationTotalPages" type="text" selector="//div[@class='admin__data-grid-pager']//label[@class='admin__control-support-text' and .='of {{arg1}}']" parameterized="true"/>
20-
<element name="gridAllRows" type="text" selector="//table[@data-content-type='grid']//tbody//tr"/>
21-
<element name="gridRow" type="text" selector="//table[@data-content-type='grid']//tbody//tr[descendant::span[@data-index='{{arg1}}' and .='{{arg2}}']]" parameterized="true"/>
22-
<element name="gridRowByIndex" type="text" selector="//table[@data-content-type='grid']//tbody//tr[{{arg1}}][descendant::span[@data-index='{{arg2}}' and .='{{arg3}}']]" parameterized="true"/>
23-
<element name="gridCell" type="text" selector="//table[@data-content-type='grid']//tbody//span[@data-index='{{arg1}}' and .='{{arg2}}']" parameterized="true"/>
24-
<element name="gridCellByRowIndex" type="text" selector="//table[@data-content-type='grid']//tbody//tr[{{arg1}}]//span[@data-index='{{arg2}}' and .='{{arg3}}']" parameterized="true"/>
25-
<element name="gridSelectButton" type="button" selector="//table[@data-content-type='grid']//tbody//tr[descendant::span[@data-index='{{arg1}}' and .='{{arg2}}']]//td[@data-index='actions']//button[@class='action-select' and .='Select']" parameterized="true"/>
26-
<element name="gridSelectButtonByIndex" type="button" selector="//table[@data-content-type='grid']//tbody//tr[{{arg1}}]//td[@data-index='actions']//button[@class='action-select' and .='Select']" parameterized="true"/>
27-
<element name="gridSelectEditButton" type="button" selector="//table[@data-content-type='grid']//tbody//tr[descendant::span[@data-index='{{arg1}}' and .='{{arg2}}']]//td[@data-index='actions']//span[@class='action-menu-item' and .='Edit']" parameterized="true"/>
28-
<element name="gridSelectDeleteButton" type="button" selector="//table[@data-content-type='grid']//tbody//tr[descendant::span[@data-index='{{arg1}}' and .='{{arg2}}']]//td[@data-index='actions']//span[@class='action-menu-item' and .='Delete']" parameterized="true"/>
20+
<element name="gridAllRows" type="text" selector="//table[@data-role='grid']//tbody//tr"/>
21+
<element name="gridRow" type="text" selector="//table[@data-role='grid']//tbody//tr[descendant::span[@data-index='{{arg1}}' and .='{{arg2}}']]" parameterized="true"/>
22+
<element name="gridRowByIndex" type="text" selector="//table[@data-role='grid']//tbody//tr[{{arg1}}][descendant::span[@data-index='{{arg2}}' and .='{{arg3}}']]" parameterized="true"/>
23+
<element name="gridCell" type="text" selector="//table[@data-role='grid']//tbody//span[@data-index='{{arg1}}' and .='{{arg2}}']" parameterized="true"/>
24+
<element name="gridCellByRowIndex" type="text" selector="//table[@data-role='grid']//tbody//tr[{{arg1}}]//span[@data-index='{{arg2}}' and .='{{arg3}}']" parameterized="true"/>
25+
<element name="gridSelectButton" type="button" selector="//table[@data-role='grid']//tbody//tr[descendant::span[@data-index='{{arg1}}' and .='{{arg2}}']]//td[@data-index='actions']//button[@class='action-select' and .='Select']" parameterized="true"/>
26+
<element name="gridSelectButtonByIndex" type="button" selector="//table[@data-role='grid']//tbody//tr[{{arg1}}]//td[@data-index='actions']//button[@class='action-select' and .='Select']" parameterized="true"/>
27+
<element name="gridSelectEditButton" type="button" selector="//table[@data-role='grid']//tbody//tr[descendant::span[@data-index='{{arg1}}' and .='{{arg2}}']]//td[@data-index='actions']//span[@class='action-menu-item' and .='Edit']" parameterized="true"/>
28+
<element name="gridSelectDeleteButton" type="button" selector="//table[@data-role='grid']//tbody//tr[descendant::span[@data-index='{{arg1}}' and .='{{arg2}}']]//td[@data-index='actions']//span[@class='action-menu-item' and .='Delete']" parameterized="true"/>
2929
</section>
3030
</sections>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderEditFormSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="EditPanelForm">
1212
<element name="editForm" type="text" selector='//div[contains(@class, "pagebuilder_modal_form_pagebuilder_modal_form_modal")]'/>
13-
<element name="editFormTitle" type="text" selector=".modal-title[data-content-type='title']"/>
13+
<element name="editFormTitle" type="text" selector=".modal-title[data-role='title']"/>
1414
<element name="editFormClose" type="button" selector=".modal-header .page-main-actions [data-form-role='close']" timeout="30"/>
1515
<element name="editFormReset" type="button" selector=".modal-header .page-main-actions [data-form-role='reset']" timeout="30"/>
1616
<element name="editFormSave" type="button" selector=".modal-header .page-main-actions [data-form-role='save']" timeout="30"/>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderMapSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
</section>
106106
<section name="AddLocationForm">
107107
<element name="form" type="text" selector="aside div.pagebuilder_map_form_pagebuilder_map_form_general_map_location_modal_map_location_insert_form"/>
108-
<element name="formTitle" type="text" selector="aside.pagebuilder_map_form_pagebuilder_map_form_general_map_location_modal h1.modal-title[data-content-type='title']"/>
108+
<element name="formTitle" type="text" selector="aside.pagebuilder_map_form_pagebuilder_map_form_general_map_location_modal h1.modal-title[data-role='title']"/>
109109
<element name="cancelButton" type="button" selector="aside.pagebuilder_map_form_pagebuilder_map_form_general_map_location_modal button#cancel"/>
110110
<element name="editFormSave" type="button" selector="aside.pagebuilder_map_form_pagebuilder_map_form_general_map_location_modal button#save"/>
111111
<element name="base" type="button" selector="//div[@data-index='position']//div[@class='map-field']"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<actionGroup ref="dragContentTypeToDropZone" stepKey="dragRowToStage">
9898
<argument name="contentType" value="PageBuilderRowContentType"/>
9999
<argument name="contentTypeIndex" value="2"/>
100-
<argument name="containerTargetType" value="PageBuilderStage"/>
100+
<argument name="containerTargetType" value="PageBuilderRootContainerContentType"/>
101101
<argument name="dropZoneIndex" value="2"/>
102102
</actionGroup>
103103
<!-- Edit 2nd Row -->

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,7 @@
20552055
</actionGroup>
20562056
<actionGroup ref="dragContentTypeToDropZone" stepKey="dragRow2IntoStage">
20572057
<argument name="contentType" value="PageBuilderRowContentType"/>
2058-
<argument name="containerTargetType" value="PageBuilderStage"/>
2058+
<argument name="containerTargetType" value="PageBuilderRootContainerContentType"/>
20592059
<argument name="containerTargetIndex" value="1"/>
20602060
<argument name="contentTypeIndex" value="2"/>
20612061
<argument name="dropZoneIndex" value="2"/>

app/code/Magento/PageBuilder/view/adminhtml/web/js/binding/live-edit.js

Lines changed: 4 additions & 4 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/js/binding/sortable-children.js

Lines changed: 4 additions & 4 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/js/config.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-collection.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/js/content-type-factory.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.

0 commit comments

Comments
 (0)