From 0a59002ef878ff8836d3ca63956f7a444d329d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milorad=20FIlipovi=C4=87?= Date: Fri, 31 Mar 2023 13:59:09 +0200 Subject: [PATCH] feat(editor): Enable saving workflow when node details view is open (#5856) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(editor): Enable saving workflow when node details view is open * ⚡ Preventing event propagation * ⚡ Move save event handler to `NodeDetailsView` * ✅ Added e2e tests * 👕 Fixing linting and removing unnecessary event logic --------- Co-authored-by: Oleg Ivaniv --- cypress/e2e/5-ndv.cy.ts | 8 ++++ .../src/components/NodeDetailsView.vue | 24 ++++++++++- .../src/plugins/i18n/locales/en.json | 1 + packages/editor-ui/src/views/NodeView.vue | 43 +++++++++++++------ 4 files changed, 63 insertions(+), 13 deletions(-) diff --git a/cypress/e2e/5-ndv.cy.ts b/cypress/e2e/5-ndv.cy.ts index 67b318da6d..ea4533725c 100644 --- a/cypress/e2e/5-ndv.cy.ts +++ b/cypress/e2e/5-ndv.cy.ts @@ -90,6 +90,14 @@ describe('NDV', () => { }); }); + it('should save workflow using keyboard shortcut from NDV', () => { + workflowPage.actions.addNodeToCanvas('Manual'); + workflowPage.actions.addNodeToCanvas('Set', true, true); + ndv.getters.container().should('be.visible'); + workflowPage.actions.saveWorkflowUsingKeyboardShortcut(); + workflowPage.getters.isWorkflowSaved(); + }) + describe('test output schema view', () => { const schemaKeys = ['id', 'name', 'email', 'notes', 'country', 'created', 'objectValue', 'prop1', 'prop2']; function setupSchemaWorkflow() { diff --git a/packages/editor-ui/src/components/NodeDetailsView.vue b/packages/editor-ui/src/components/NodeDetailsView.vue index 07e27bbfba..0b4dd3de86 100644 --- a/packages/editor-ui/src/components/NodeDetailsView.vue +++ b/packages/editor-ui/src/components/NodeDetailsView.vue @@ -28,7 +28,13 @@ -
+