Skip to content

Commit b3d56b3

Browse files
author
Hwashiang Yu
committed
MC-5810: Improve naming of the critical variables/parameters in the code and configuration
- Resolved mftf test failure
1 parent 3bf029d commit b3d56b3

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
</section>
114114
<section name="AddLocationForm">
115115
<element name="form" type="text" selector="aside div.pagebuilder_map_form_pagebuilder_map_form_general_map_location_modal_map_location_insert_form"/>
116-
<element name="formTitle" type="text" selector="aside.pagebuilder_map_form_pagebuilder_map_form_general_map_location_modal h1.modal-title[data-content-type='title']"/>
116+
<element name="formTitle" type="text" selector="aside.pagebuilder_map_form_pagebuilder_map_form_general_map_location_modal h1.modal-title[data-role='title']"/>
117117
<element name="cancelButton" type="button" selector="aside.pagebuilder_map_form_pagebuilder_map_form_general_map_location_modal button#cancel"/>
118118
<element name="editFormSave" type="button" selector="aside.pagebuilder_map_form_pagebuilder_map_form_general_map_location_modal button#save"/>
119119
<element name="base" type="button" selector="//div[@data-index='position']//div[@class='map-field']"/>

app/code/Magento/PageBuilder/view/adminhtml/web/js/master-format/read/configurable.js

Lines changed: 2 additions & 2 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/master-format/read/configurable.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ export default class Configurable implements ReadInterface {
109109
return currentElement[0];
110110
}
111111

112-
// Attempt to find the element in the children of the data-role
112+
// Attempt to find the element in the children of the data-content-type
113113
const searchInChildren = currentElement.find(`[data-element="${name}"]`);
114114
// Ensure the element is within the current content type
115-
if (searchInChildren.length > 0 && searchInChildren.closest("[data-role]")[0] === currentElement[0]) {
115+
if (searchInChildren.length > 0
116+
&& searchInChildren.closest("[data-content-type]")[0] === currentElement[0]
117+
) {
116118
return searchInChildren[0];
117119
}
118120

0 commit comments

Comments
 (0)