mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(editor): Fix redo when adding node on connection (#6833)
* fix(editor): Fix redo when adding node on connection * ✅ Adding tests for pushed nodes * ✔️ Updating drag command for dragging nodes on the canvas * 👌 Handling drag end with a command option
This commit is contained in:
committed by
GitHub
parent
0ac3d47f26
commit
4ac4b850dd
@@ -112,7 +112,6 @@ Cypress.Commands.add('drag', (selector, pos, options) => {
|
||||
x: options?.abs ? xDiff : originalLocation.right + xDiff,
|
||||
y: options?.abs ? yDiff : originalLocation.top + yDiff,
|
||||
}
|
||||
|
||||
if(options?.realMouse) {
|
||||
element.realMouseDown();
|
||||
element.realMouseMove(newPosition.x, newPosition.y);
|
||||
@@ -125,7 +124,13 @@ Cypress.Commands.add('drag', (selector, pos, options) => {
|
||||
pageY: newPosition.y,
|
||||
force: true,
|
||||
});
|
||||
element.trigger('mouseup', {force: true});
|
||||
if (options?.clickToFinish) {
|
||||
// Click to finish the drag
|
||||
// For some reason, mouseup isn't working when moving nodes
|
||||
cy.get('body').click(newPosition.x, newPosition.y);
|
||||
} else {
|
||||
element.trigger('mouseup', {force: true});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user