Skip to content

Commit 3964734

Browse files
Merge branch '692_fix_skipped_tests' of github.com:magento/magento2-page-builder into PR-bundle
2 parents b4d362b + c5d2860 commit 3964734

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
<group value="pagebuilder-row"/>
2121
<group value="pagebuilder-heading"/>
2222
<group value="pagebuilder-hideShow"/>
23-
<skip>
24-
<issueId value="PB-701" />
25-
</skip>
2623
</annotations>
2724
<before>
2825
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderTabGroupTest/ValidateCannotMoveContentTypeIntoHiddenTabTest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
<group value="pagebuilder-tab"/>
2222
<group value="pagebuilder-tabGroup"/>
2323
<group value="pagebuilder-hideShow"/>
24-
<skip>
25-
<issueId value="PB-701" />
26-
</skip>
2724
</annotations>
2825
<before>
2926
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

app/code/Magento/PageBuilder/view/adminhtml/web/js/drag-drop/sortable.js

Lines changed: 3 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/drag-drop/sortable.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,19 @@ function onSortReceive(preview: Preview, event: Event, ui: JQueryUI.SortableUIPa
243243
*/
244244
function onSortUpdate(preview: Preview, event: Event, ui: JQueryUI.SortableUIParams) {
245245
// If the sortable instance is disabled don't complete this operation
246-
if ($(this).sortable("option", "disabled") || ui.item.parents(hiddenClass).length > 0) {
246+
if (($(this).hasClass("ui-sortable") && $(this).sortable("option", "disabled"))
247+
|| ui.item.parents(hiddenClass).length > 0
248+
) {
247249
ui.item.remove();
248250
$(this).sortable("cancel");
249251

250252
// jQuery tries to reset the state but kills KO's bindings, so we'll force a re-render on the content type
251253
if (ui.item.length > 0 && typeof ko.dataFor(ui.item[0]) !== "undefined") {
252-
const contentType = ko.dataFor(ui.item[0]).contentType as ContentTypeCollectionInterface;
254+
const data = ko.dataFor(ui.item[0]);
255+
const contentType = data.contentType && data.contentType.getChildren ?
256+
data.contentType as ContentTypeCollectionInterface :
257+
data.parentContentType as ContentTypeCollectionInterface;
258+
253259
const children = contentType.getChildren()().splice(0);
254260
contentType.getChildren()([]);
255261
contentType.getChildren()(children);

0 commit comments

Comments
 (0)