Skip to content

Commit ad07214

Browse files
authored
Merge pull request #124 from magento-trigger/AC-106
[Trigger] jQuery-UI upgrade
2 parents 3469552 + baab6d4 commit ad07214

File tree

12 files changed

+26
-22
lines changed

12 files changed

+26
-22
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
<argument name="offsetYCoordinate" defaultValue="5" type="string"/>
1616
</arguments>
1717
<waitForElementVisible time="10" selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}" stepKey="waitForContentTypeInStageVisible"/>
18-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentTypeStage"/>
18+
<moveMouseOver stepKey="moveMouseOverSearch" selector="{{PageBuilderPanel.searchPanel}}" />
19+
<executeJS function="return ['row', 'column'].include('{{contentType.role}}') ? '//div[contains(@class, &quot;pagebuilder-display-label&quot;) and contains(.,&quot;'+'{{contentType.role}}'.toUpperCase()+'&quot;)]' : ['tabs'].include('{{contentType.role}}') ? '//ul[@data-element=&quot;navigation&quot;]' : '';" stepKey="contentTypeLabelSelector" />
20+
<executeJS function="return ['row'].include('{{contentType.role}}') ? '(//div[contains(@class, &quot;pagebuilder-content-type-affordance&quot;) and contains(@class, &quot;pagebuilder-affordance-{{contentType.role}}&quot;)])' : '(//div[contains(@class, &quot;pagebuilder-content-type&quot;) and contains(@class, &quot;pagebuilder-{{contentType.role}}&quot;)])';" stepKey="contentTypeSelector" />
21+
<moveMouseOver selector="{$contentTypeSelector}{$contentTypeLabelSelector}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentTypeStage"/>
1922
<waitForPageLoad stepKey="waitForOptionsAnimation"/>
2023
<waitForElementVisible time="10" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenuByIndex(contentType.role, '1')}}" stepKey="waitForOptions"/>
2124
<click selector="{{PageBuilderContentTypeOptionsMenu.contentTypeRemove(contentType.role)}}" stepKey="clickRemoveContentType"/>

app/code/Magento/PageBuilder/Test/Mftf/Data/BackgroundFormData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<data key="value"/>
1515
<data key="rgba">rgba(0, 0, 0, 0)</data>
1616
<data key="rgb">rgba(0, 0, 0, 0)</data>
17-
<data key="colorSwatchColor">rgba(0, 0, 0, 0)</data>
17+
<data key="colorSwatchColor">transparent</data>
1818
<data key="colorWheelDefault">rgb(255, 0, 0)</data>
1919
<data key="placeholderText">No Color</data>
2020
</entity>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderTabsSection/TabOnStageSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<element name="baseJS" type="text" selector="document.querySelectorAll('[data-content-type=tab-item]')[{{arg1}} - 1]" parameterized="true"/>
1313
<element name="elementChildren" type="text" selector="(//*[@role=&quot;tabpanel&quot;])[{{arg1}}]//div[contains(@class, &quot;pagebuilder-tab-item&quot;)]//div[contains(@class, &quot;tab-item-container&quot;)]" parameterized="true"/>
1414
<element name="all" type="button" selector=".pagebuilder-tab-item"/>
15-
<element name="moveHandle" type="button" selector="(//div[@data-content-type='tabs'])[{{arg1}}]//li[@role='tab'][{{arg2}}]//span[@class='tab-drag-handle']" parameterized="true"/>
15+
<element name="moveHandle" type="button" selector="(//div[@data-content-type='tabs'])[{{arg1}}]//li[@role='tab'][{{arg2}}]//span[contains(@class, 'tab-drag-handle')]" parameterized="true"/>
1616
<element name="tabHeader" type="button" selector="(//ul[contains(@class, 'tabs-navigation')]//a[contains(@class, 'tab-title')])[{{arg1}}]" parameterized="true"/>
1717
<element name="tabHeaderCSS" type="button" selector="[data-content-type=tabs] [role=presentation]"/>
1818
<element name="tabHeaderEditableTitle" type="button" selector="(//ul[contains(@class, 'tabs-navigation')]//a[contains(@class, 'tab-title')])[{{arg1}}]//span[contains(@contenteditable, 'true')]" parameterized="true"/>
@@ -30,6 +30,7 @@
3030
<element name="optionsMenuButtonDisabled" type="button" selector="(//ul[contains(@class,'tabs-navigation')]//div[contains(@class,'pagebuilder-options-wrapper')])[{{arg1}}]//a[contains(@class,'{{arg2}}') and contains(@class,'disabled')]" parameterized="true"/>
3131
<element name="default" type="button" selector="(//div[contains(@class,'pagebuilder-tabs') and contains(@class,'ui-tabs')]//div[@role='tabpanel'])[{{arg1}}][not(contains(@style,'border:'))]" parameterized="true"/>
3232
<element name="tabTitle" type="button" selector="//*[@name='tabs[{{arg1}}][title]']" parameterized="true"/>
33+
<element name="tab" type="button" selector="//*[@role='tab'][{{arg1}}]" parameterized="true"/>
3334
<element name="tabPanel" type="button" selector="//*[@role='tabpanel'][{{arg1}}]" parameterized="true"/>
3435
<element name="tabContent" type="button" selector="//*[@role=&quot;tabpanel&quot;][{{arg1}}]//div[contains(@class, &quot;pagebuilder-tab-item&quot;)]" parameterized="true"/>
3536
<element name="cssClasses" type="button" selector="//*[@role=&quot;tabpanel&quot;][{{arg1}}]//div[contains(@class, &quot;pagebuilder-tab-item&quot;)][contains(@class,'{{arg2}}')]" parameterized="true"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderTabItemConfigurationTest/DefaultTabItemStateOnAddingNewTabTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<!-- User sees the first tab to be active and focused. -->
5454
<comment userInput="User sees the first tab to be active and focused." stepKey="AC4"/>
5555
<assertElementContainsAttribute stepKey="assertTab1ContentFocused">
56-
<expectedResult selector="{{TabOnStage.tabPanel('1')}}" attribute="aria-expanded" type="string">true</expectedResult>
56+
<expectedResult selector="{{TabOnStage.tab('1')}}" attribute="aria-expanded" type="string">true</expectedResult>
5757
</assertElementContainsAttribute>
5858
<assertElementContainsAttribute stepKey="assertTab1ContentVisible">
5959
<expectedResult selector="{{TabOnStage.tabPanel('1')}}" attribute="aria-hidden" type="string">false</expectedResult>

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/buttons/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-group/preview.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/slider/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/panel.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/content-type/buttons/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class Preview extends PreviewCollection {
5252
// Keeps track of number of button item to disable sortable if there is only 1.
5353
this.contentType.children.subscribe(() => {
5454
const sortableElement = $(this.wrapperElement).find(".buttons-container");
55-
if (!sortableElement.data("sortable")) {
55+
if (!sortableElement.data("ui-sortable")) {
5656
return;
5757
}
5858
if (this.contentType.children().length <= 1) {

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
@@ -595,7 +595,7 @@ export default class Preview extends PreviewCollection {
595595
_.defer(() => {
596596
// Re-enable any disabled sortable areas
597597
group.find(".ui-sortable").each(function() {
598-
if ($(this).data("sortable")) {
598+
if ($(this).data("ui-sortable")) {
599599
$(this).sortable("option", "disabled", false);
600600
}
601601
});
@@ -873,7 +873,7 @@ export default class Preview extends PreviewCollection {
873873
event.pageY < (groupPosition.top + groupPosition.outerHeight) - 20
874874
) {
875875
// Disable the column group sortable instance
876-
if (elementChildrenParent.data("sortable")) {
876+
if (elementChildrenParent.data("ui-sortable")) {
877877
elementChildrenParent.sortable("option", "disabled", true);
878878
}
879879

@@ -892,7 +892,7 @@ export default class Preview extends PreviewCollection {
892892
}
893893
} else if (this.dropOverElement) {
894894
// Re-enable the column group sortable instance
895-
if (elementChildrenParent.data("sortable")) {
895+
if (elementChildrenParent.data("ui-sortable")) {
896896
elementChildrenParent.sortable("option", "disabled", false);
897897
}
898898
this.dropPosition = null;
@@ -917,7 +917,7 @@ export default class Preview extends PreviewCollection {
917917
_.defer(() => {
918918
// Re-enable the column group sortable instance & all children sortable instances
919919
group.parents(".element-children").each(function() {
920-
if ($(this).data("sortable")) {
920+
if ($(this).data("ui-sortable")) {
921921
$(this).sortable("option", "disabled", false);
922922
}
923923
});
@@ -926,7 +926,7 @@ export default class Preview extends PreviewCollection {
926926
activate() {
927927
if (getDraggedContentTypeConfig() === Config.getContentTypeConfig("column")) {
928928
group.find(".ui-sortable").each(function() {
929-
if ($(this).data("sortable")) {
929+
if ($(this).data("ui-sortable")) {
930930
$(this).sortable("option", "disabled", true);
931931
}
932932
});

0 commit comments

Comments
 (0)