diff --git a/packages/survey-creator-angular/src/question-widget.component.html b/packages/survey-creator-angular/src/question-widget.component.html index 2ea5c9cd54..357663fe2b 100644 --- a/packages/survey-creator-angular/src/question-widget.component.html +++ b/packages/survey-creator-angular/src/question-widget.component.html @@ -1,15 +1,23 @@ -
-
+
+
+
+
+
+
- +
-
-
+
+
diff --git a/packages/survey-creator-knockout/src/question-widget.html b/packages/survey-creator-knockout/src/question-widget.html index a8e4a23b98..c8fa12def1 100644 --- a/packages/survey-creator-knockout/src/question-widget.html +++ b/packages/survey-creator-knockout/src/question-widget.html @@ -2,6 +2,10 @@ data-bind="css: rootCss(), attr: { 'data-sv-drop-target-survey-element': element.name }, event: { mouseover: function(m, e) { hover(e, $element); }, mouseleave: function(m, e) { hover(e, $element); } }">
+
+
+
+
diff --git a/packages/survey-creator-vue/src/adorners/CustomWidget.vue b/packages/survey-creator-vue/src/adorners/CustomWidget.vue index 4715e6a7bd..8df36a4bcc 100644 --- a/packages/survey-creator-vue/src/adorners/CustomWidget.vue +++ b/packages/survey-creator-vue/src/adorners/CustomWidget.vue @@ -16,6 +16,18 @@ @click="model.select(model, $event)" data-bind="clickBubble: false" > +
+
+
+
{ await takeElementScreenshot("drag-drop-in-collapsed-page.png", ".svc-tab-designer_content", t, comparer); }); }); + +fixture`DragDrop custom widget Screenshot`.page`http://127.0.0.1:8080/testCafe/testcafe-widget.html`.beforeEach(async (t) => { +}); + +test("Drag indicator for custom widget", async (t) => { + await wrapVisualTest(t, async (t, comparer) => { + await t.resizeWindow(1252, 900); + + const json = { + elements: [{ type: "bootstrapdatepicker", name: "q1" }, { type: "bootstrapdatepicker", name: "q2" }] + }; + await setJSON(json); + + await patchDragDropToDisableDrop(); + + const q1 = Selector("[data-sv-drop-target-survey-element='q1']"); + await t + .hover(RatingToolboxItem) + .dragToElement(RatingToolboxItem, q1, { speed: 0.5, offsetX: 100, offsetY: 10 }); + + await takeElementScreenshot("drag-drop-over-custom-widget.png", Selector(".svc-page").nth(0), t, comparer); + }); +}); \ No newline at end of file diff --git a/visualRegressionTests/tests/designer/etalons/drag-drop-over-custom-widget.png b/visualRegressionTests/tests/designer/etalons/drag-drop-over-custom-widget.png new file mode 100644 index 0000000000..f59ec36ef7 Binary files /dev/null and b/visualRegressionTests/tests/designer/etalons/drag-drop-over-custom-widget.png differ