-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(editor): Color node connections correctly in execution preview fo…
…r nodes that have pinned data (#9669)
- Loading branch information
Showing
9 changed files
with
169 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { v4 as uuid } from 'uuid'; | ||
import { WorkflowExecutionsTab, WorkflowPage as WorkflowPageClass } from '../pages'; | ||
import { BACKEND_BASE_URL } from '../constants'; | ||
|
||
const workflowPage = new WorkflowPageClass(); | ||
const executionsTab = new WorkflowExecutionsTab(); | ||
|
||
describe('ADO-2106 connections should be colored correctly for pinned data in executions preview', () => { | ||
beforeEach(() => { | ||
workflowPage.actions.visit(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.createFixtureWorkflow('Webhook_set_pinned.json', `Webhook set pinned ${uuid()}`); | ||
workflowPage.actions.deselectAll(); | ||
workflowPage.getters.zoomToFitButton().click(); | ||
|
||
workflowPage.getters.getConnectionBetweenNodes('Webhook', 'Set').should('have.class', 'pinned'); | ||
}); | ||
|
||
it('should not color connections for pinned data nodes for production executions', () => { | ||
workflowPage.actions.activateWorkflow(); | ||
|
||
// Execute the workflow | ||
cy.request('POST', `${BACKEND_BASE_URL}/webhook/23fc3930-b8f9-41d9-89db-b647291a2201`, { | ||
here: 'is some data', | ||
}).then((response) => { | ||
expect(response.status).to.eq(200); | ||
}); | ||
|
||
executionsTab.actions.switchToExecutionsTab(); | ||
|
||
executionsTab.getters.successfulExecutionListItems().should('have.length', 1); | ||
|
||
executionsTab.getters | ||
.workflowExecutionPreviewIframe() | ||
.should('be.visible') | ||
.its('0.contentDocument.body') | ||
.should('not.be.empty') | ||
.then(cy.wrap) | ||
.find(`.jtk-connector[data-source-node="Webhook"][data-target-node="Set"]`) | ||
.should('have.class', 'success') | ||
.should('have.class', 'has-run') | ||
.should('not.have.class', 'pinned'); | ||
}); | ||
|
||
it('should color connections for pinned data nodes for manual executions', () => { | ||
workflowPage.actions.executeWorkflow(); | ||
|
||
executionsTab.actions.switchToExecutionsTab(); | ||
|
||
executionsTab.getters.successfulExecutionListItems().should('have.length', 1); | ||
|
||
executionsTab.getters | ||
.workflowExecutionPreviewIframe() | ||
.should('be.visible') | ||
.its('0.contentDocument.body') | ||
.should('not.be.empty') | ||
.then(cy.wrap) | ||
.find(`.jtk-connector[data-source-node="Webhook"][data-target-node="Set"]`) | ||
.should('have.class', 'success') | ||
.should('have.class', 'has-run') | ||
.should('have.class', 'pinned'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"nodes": [ | ||
{ | ||
"parameters": { | ||
"options": {} | ||
}, | ||
"id": "bd816131-d8ad-4b4c-90d6-59fdab2e6307", | ||
"name": "Set", | ||
"type": "n8n-nodes-base.set", | ||
"typeVersion": 1, | ||
"position": [ | ||
720, | ||
460 | ||
] | ||
}, | ||
{ | ||
"parameters": { | ||
"httpMethod": "POST", | ||
"path": "23fc3930-b8f9-41d9-89db-b647291a2201", | ||
"options": {} | ||
}, | ||
"id": "82fe0f6c-854a-4eb9-b311-d7b43025c047", | ||
"name": "Webhook", | ||
"type": "n8n-nodes-base.webhook", | ||
"typeVersion": 1, | ||
"position": [ | ||
460, | ||
460 | ||
], | ||
"webhookId": "23fc3930-b8f9-41d9-89db-b647291a2201" | ||
} | ||
], | ||
"connections": { | ||
"Webhook": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "Set", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
"pinData": { | ||
"Webhook": [ | ||
{ | ||
"headers": { | ||
"host": "localhost:5678", | ||
"content-length": "37", | ||
"accept": "*/*", | ||
"content-type": "application/json", | ||
"accept-encoding": "gzip" | ||
}, | ||
"params": {}, | ||
"query": {}, | ||
"body": { | ||
"here": "be", | ||
"dragons": true | ||
}, | ||
"webhookUrl": "http://localhost:5678/webhook-test/23fc3930-b8f9-41d9-89db-b647291a2201", | ||
"executionMode": "test" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters