mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
test(editor): Enable adding nodes in between any two nodes on canvas in e2e tests (no-changelog) (#5393)
* ⚡ Adding source and target test data to connection HTML elements * ⚡ Using new action to add node on the connection * 🔥 Removing leftover log * 🔥 Removing leftover test action * 👌 Refactoring to address PR feedback
This commit is contained in:
committed by
GitHub
parent
7e2f2f7453
commit
d05203db30
@@ -3,6 +3,7 @@ import {
|
||||
CODE_NODE_NAME,
|
||||
SCHEDULE_TRIGGER_NODE_NAME,
|
||||
SET_NODE_NAME,
|
||||
HTTP_REQUEST_NODE_NAME,
|
||||
} from './../constants';
|
||||
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
||||
|
||||
@@ -61,14 +62,16 @@ describe('Canvas Actions', () => {
|
||||
it('should add note between two connected nodes', () => {
|
||||
WorkflowPage.actions.addNodeToCanvas(SCHEDULE_TRIGGER_NODE_NAME);
|
||||
WorkflowPage.actions.addNodeToCanvas(CODE_NODE_NAME);
|
||||
WorkflowPage.actions.addNodeBetweenFirstTwoNodes(SET_NODE_NAME);
|
||||
WorkflowPage.getters.canvasNodes().should('have.length', 3);
|
||||
WorkflowPage.getters.nodeConnections().should('have.length', 2);
|
||||
WorkflowPage.actions.addNodeToCanvas(SET_NODE_NAME);
|
||||
WorkflowPage.actions.zoomToFit();
|
||||
WorkflowPage.actions.addNodeBetweenNodes(CODE_NODE_NAME, SET_NODE_NAME, HTTP_REQUEST_NODE_NAME);
|
||||
WorkflowPage.getters.canvasNodes().should('have.length', 4);
|
||||
WorkflowPage.getters.nodeConnections().should('have.length', 3);
|
||||
// And last node should be pushed to the right
|
||||
WorkflowPage.getters
|
||||
.canvasNodes()
|
||||
.last()
|
||||
.should('have.attr', 'style', 'left: 640px; top: 260px;');
|
||||
.should('have.attr', 'style', 'left: 860px; top: 260px;');
|
||||
});
|
||||
|
||||
it('should delete node using node action button', () => {
|
||||
|
||||
Reference in New Issue
Block a user