Skip to content

Commit c86ea44

Browse files
committed
fix matrix drag-drop f-tests (set destination offset for correct drop)
1 parent d3428e0 commit c86ea44

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

functionalTests/designer/drag-drop.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,6 +1272,8 @@ test("Drag Drop MatrixRows (property grid)", async (t) => {
12721272
await t
12731273
.hover(Item1).hover(Item2).hover(Item3).hover(DragZoneItem2)
12741274
.dragToElement(DragZoneItem2, Item1, {
1275+
destinationOffsetX: 5,
1276+
destinationOffsetY: 5,
12751277
offsetX: 5,
12761278
offsetY: 5,
12771279
speed: 0.5
@@ -1282,7 +1284,8 @@ test("Drag Drop MatrixRows (property grid)", async (t) => {
12821284
await t.expect(value).eql(expectedValue);
12831285

12841286
DragZoneItem2 = Selector("[data-name=\"choices\"] [data-sv-drop-target-matrix-row]").nth(0).find(".spg-drag-element__svg");
1285-
await t.dragToElement(DragZoneItem2, Item3, { offsetX: 5, offsetY: 5, speed: 0.5 });
1287+
await t.dragToElement(DragZoneItem2, Item3, { destinationOffsetX: 5,
1288+
destinationOffsetY: -5, offsetX: 5, offsetY: 5, speed: 0.5 });
12861289

12871290
value = await getItemValueByIndex("question1", 2);
12881291
await t.expect(value).eql(expectedValue);
@@ -1337,6 +1340,8 @@ test("Drag Drop Pages MatrixRows (property grid Pages)", async (t) => {
13371340
await t
13381341
.hover(Page1).hover(Page2).hover(Page3).hover(DragZonePage2)
13391342
.dragToElement(DragZonePage2, Page1, {
1343+
destinationOffsetX: 5,
1344+
destinationOffsetY: 5,
13401345
offsetX: 5,
13411346
offsetY: 5,
13421347
speed: 0.5

0 commit comments

Comments
 (0)