Skip to content

Commit

Permalink
feat(editor): Node Creator AI nodes improvements (#9484)
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
  • Loading branch information
OlegIvaniv authored May 30, 2024
1 parent e68a3fd commit be4f54d
Show file tree
Hide file tree
Showing 62 changed files with 659 additions and 202 deletions.
2 changes: 1 addition & 1 deletion cypress/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const INSTANCE_MEMBERS = [
];

export const MANUAL_TRIGGER_NODE_NAME = 'Manual Trigger';
export const MANUAL_TRIGGER_NODE_DISPLAY_NAME = 'When clicking "Test workflow"';
export const MANUAL_TRIGGER_NODE_DISPLAY_NAME = 'When clicking Test workflow';
export const MANUAL_CHAT_TRIGGER_NODE_NAME = 'Chat Trigger';
export const SCHEDULE_TRIGGER_NODE_NAME = 'Schedule Trigger';
export const CODE_NODE_NAME = 'Code';
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/19-execution.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ describe('Execution', () => {

cy.wait('@workflowRun').then((interception) => {
expect(interception.request.body).to.have.property('runData').that.is.an('object');
const expectedKeys = ['When clicking "Test workflow"', 'fetch 5 random users'];
const expectedKeys = ['When clicking Test workflow', 'fetch 5 random users'];

expect(Object.keys(interception.request.body.runData)).to.have.lengthOf(expectedKeys.length);
expect(interception.request.body.runData).to.include.all.keys(expectedKeys);
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/4-node-creator.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Node Creator', () => {
nodeCreatorFeature.actions.openNodeCreator();

nodeCreatorFeature.getters.searchBar().find('input').type('manual');
nodeCreatorFeature.getters.creatorItem().should('have.length', 2);
nodeCreatorFeature.getters.creatorItem().should('have.length', 1);
nodeCreatorFeature.getters.searchBar().find('input').clear().type('manual123');
nodeCreatorFeature.getters.creatorItem().should('have.length', 0);
nodeCreatorFeature.getters
Expand Down Expand Up @@ -159,7 +159,7 @@ describe('Node Creator', () => {

it('should have "Triggers" section collapsed when opening actions view from Regular root view', () => {
nodeCreatorFeature.actions.openNodeCreator();
nodeCreatorFeature.getters.getCreatorItem('Manually').click();
nodeCreatorFeature.getters.getCreatorItem('Trigger manually').click();

nodeCreatorFeature.actions.openNodeCreator();
nodeCreatorFeature.getters.searchBar().find('input').clear().type('n8n');
Expand Down Expand Up @@ -308,7 +308,7 @@ describe('Node Creator', () => {
nodeCreatorFeature.getters.getCategoryItem('Actions').click();
nodeCreatorFeature.getters.getCreatorItem('Create a credential').click();
NDVModal.actions.close();
WorkflowPage.actions.deleteNode('When clicking "Test workflow"');
WorkflowPage.actions.deleteNode('When clicking Test workflow');
WorkflowPage.getters.canvasNodePlusEndpointByName('n8n').click();
nodeCreatorFeature.getters.searchBar().find('input').clear().type('n8n');
nodeCreatorFeature.getters.getCreatorItem('n8n').click();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/41-editors.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Editors', () => {
});
ndv.actions.close();

workflowPage.actions.openNode('When clicking "Test workflow"');
workflowPage.actions.openNode('When clicking Test workflow');
ndv.actions.setPinnedData([{ table: 'test_table' }]);
ndv.actions.close();

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/5-ndv.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ describe('NDV', () => {
ndv.getters.backToCanvas().click();
workflowPage.actions.executeWorkflow();
// Manual tigger node should show success indicator
workflowPage.actions.openNode('When clicking "Test workflow"');
workflowPage.actions.openNode('When clicking Test workflow');
ndv.getters.nodeRunSuccessIndicator().should('exist');
// Code node should show error
ndv.getters.backToCanvas().click();
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Floating_Nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "d0eda550-2526-42a1-aa19-dee411c8acf9",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -91,7 +91,7 @@
],
"pinData": {},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Lots_of_nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "369fe424-dd3b-4399-9de3-50bd4ce1f75b",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -570,7 +570,7 @@
],
"pinData": {},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
6 changes: 3 additions & 3 deletions cypress/fixtures/Multiple_trigger_node_rerun.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "5ae8991f-08a2-4b27-b61c-85e3b8a83693",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -78,14 +78,14 @@
}
}
],
"When clicking \"Test workflow\"": [
"When clicking Test workflow": [
{
"json": {}
}
]
},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/NDV-test-switch_reorder.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "b3f0815d-b733-413f-ab3f-74e48277bd3a",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -160,7 +160,7 @@
]
},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
6 changes: 3 additions & 3 deletions cypress/fixtures/Node_IO_filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "46770685-44d1-4aad-9107-1d790cf26b50",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -74,7 +74,7 @@
}
],
"pinData": {
"When clicking \"Test workflow\"": [
"When clicking Test workflow": [
{
"json": {
"id": "654cfa05fa51480dcb543b1a",
Expand Down Expand Up @@ -599,7 +599,7 @@
]
},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
16 changes: 8 additions & 8 deletions cypress/fixtures/Suggested_Templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -92,7 +92,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down Expand Up @@ -191,7 +191,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -241,7 +241,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down Expand Up @@ -374,7 +374,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -424,7 +424,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down Expand Up @@ -524,7 +524,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -574,7 +574,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "f26332f3-c61a-4843-94bd-64a73ad161ff",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -105,7 +105,7 @@
],
"pinData": {},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"parameters": {},
"id": "449ab540-d9d7-480d-b131-05e9989a69cd",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand All @@ -42,7 +42,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_5.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{
"parameters": {},
"id": "ef63cdc5-50bc-4525-9873-7e7f7589a60e",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -199,7 +199,7 @@
]
]
},
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "f332a7d1-31b4-4e78-b31e-9e8db945bf3f",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -99,7 +99,7 @@
],
"pinData": {},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_ndv_run_error.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
"parameters": {},
"id": "4f4c6527-d565-448a-96bd-8f5414caf8cc",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -136,7 +136,7 @@
]
]
},
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/Test_workflow_ndv_version.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"nodes": [
{
"id": "2acca986-10a6-451e-b20a-86e95b50e627",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [460, 460]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"parameters": {},
"id": "09e4325e-ede1-40cf-a1ba-58612bbc7f1b",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -77,7 +77,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_schema_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{
"parameters": {},
"id": "58512a93-dabf-4584-817f-27c608c1bdd5",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand All @@ -69,7 +69,7 @@
]
]
},
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_schema_test_pinned_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{
"parameters": {},
"id": "3dc7cf26-ff25-4437-b9fd-0e8b127ebec9",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -552,7 +552,7 @@
]
]
},
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
Loading

0 comments on commit be4f54d

Please sign in to comment.