diff --git a/cypress/e2e/4-node-creator.cy.ts b/cypress/e2e/4-node-creator.cy.ts index 4f43684c93..4068b2c1fd 100644 --- a/cypress/e2e/4-node-creator.cy.ts +++ b/cypress/e2e/4-node-creator.cy.ts @@ -112,6 +112,20 @@ describe('Node Creator', () => { NDVModal.getters.parameterInput('operation').should('contain.text', 'Crop'); }) + it('should search through actions and confirm added action', () => { + nodeCreatorFeature.actions.openNodeCreator(); + nodeCreatorFeature.getters.searchBar().find('input').clear().type('ftp'); + nodeCreatorFeature.getters.searchBar().find('input').realPress('{rightarrow}'); + nodeCreatorFeature.getters.activeSubcategory().should('have.text', 'FTP'); + nodeCreatorFeature.getters.searchBar().find('input').clear().type('file'); + // Navigate to rename action which should be the 4th item + nodeCreatorFeature.getters.searchBar().find('input').realPress('{downarrow}'); + nodeCreatorFeature.getters.searchBar().find('input').realPress('{downarrow}'); + nodeCreatorFeature.getters.searchBar().find('input').realPress('{downarrow}'); + nodeCreatorFeature.getters.searchBar().find('input').realPress('{rightarrow}'); + NDVModal.getters.parameterInput('operation').should('contain.text', 'Rename'); + }) + it('should render and select community node', () => { cy.intercept('GET', '/types/nodes.json').as('nodesIntercept'); cy.wait('@nodesIntercept').then(() => { diff --git a/packages/editor-ui/src/components/Node.vue b/packages/editor-ui/src/components/Node.vue index 203563af6c..981dc9a38c 100644 --- a/packages/editor-ui/src/components/Node.vue +++ b/packages/editor-ui/src/components/Node.vue @@ -22,8 +22,13 @@ v-touch:start="touchStart" v-touch:end="touchEnd" > - - + + + + +
(isRoot.value ? activeView.value.items : const searchItems = computed(() => { return state.activeNodeActions - ? transformCreateElements(selectedNodeActions.value) + ? transformCreateElements(selectedNodeActions.value, 'action') : transformCreateElements(filteredMergedAppNodes.value); }); @@ -251,6 +251,7 @@ function sortActions(nodeCreateElements: INodeCreateElement[]): INodeCreateEleme function transformCreateElements( createElements: Array, + type: 'node' | 'action' = 'node', ): INodeCreateElement[] { const sorted = [...createElements]; @@ -265,7 +266,7 @@ function transformCreateElements( // if we have more cases like this we should add more robust logic const isN8nNode = nodeType.name.includes(N8N_NODE_TYPE); return { - type: 'node', + type, category: nodeType.codex?.categories, key: nodeType.name, properties: { @@ -274,7 +275,7 @@ function transformCreateElements( }, includedByTrigger: isN8nNode || nodeType.group.includes('trigger'), includedByRegular: isN8nNode || !nodeType.group.includes('trigger'), - }; + } as INodeCreateElement; }); } diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index 4b01c2260d..77f03c9c87 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -663,6 +663,7 @@ "ndv.pinData.error.tooLarge.description": "You can pin at most 12MB of output per workflow.", "noTagsView.readyToOrganizeYourWorkflows": "Ready to organize your workflows?", "noTagsView.withWorkflowTagsYouReFree": "With workflow tags, you're free to create the perfect tagging system for your flows", + "node.thisIsATriggerNode": "This is a Trigger node. Learn more", "node.activateDeactivateNode": "Activate/Deactivate Node", "node.deleteNode": "Delete Node", "node.disabled": "Disabled",