diff --git a/cypress/e2e/29-templates.cy.ts b/cypress/e2e/29-templates.cy.ts index 5b52889c94..727b0cbe3f 100644 --- a/cypress/e2e/29-templates.cy.ts +++ b/cypress/e2e/29-templates.cy.ts @@ -129,7 +129,6 @@ describe('Workflow templates', () => { workflowPage.actions.shouldHaveWorkflowName('Demo: ' + OnboardingWorkflow.name); workflowPage.getters.canvasNodes().should('have.length', 4); workflowPage.getters.stickies().should('have.length', 1); - workflowPage.getters.canvasNodes().first().should('have.descendants', '.node-pin-data-icon'); }); it('can import template', () => { @@ -142,6 +141,7 @@ describe('Workflow templates', () => { }); it('should save template id with the workflow', () => { + cy.intercept('POST', '/rest/workflows').as('saveWorkflow'); templatesPage.actions.importTemplate(); cy.visit(templatesPage.url); @@ -159,10 +159,8 @@ describe('Workflow templates', () => { workflowPage.actions.hitSelectAll(); workflowPage.actions.hitCopy(); - cy.grantBrowserPermissions('clipboardReadWrite', 'clipboardSanitizedWrite'); - // Check workflow JSON by copying it to clipboard - cy.readClipboard().then((workflowJSON) => { - expect(workflowJSON).to.contain('"templateId": "1"'); + cy.wait('@saveWorkflow').then((interception) => { + expect(interception.request.body.meta.templateId).to.equal('1'); }); }); diff --git a/cypress/pages/workflow.ts b/cypress/pages/workflow.ts index 1b63688da1..e99b01aa46 100644 --- a/cypress/pages/workflow.ts +++ b/cypress/pages/workflow.ts @@ -32,7 +32,11 @@ export class WorkflowPage extends BasePage { canvasNodes: () => cy.ifCanvasVersion( () => cy.getByTestId('canvas-node'), - () => cy.getByTestId('canvas-node').not('[data-node-type="n8n-nodes-internal.addNodes"]'), + () => + cy + .getByTestId('canvas-node') + .not('[data-node-type="n8n-nodes-internal.addNodes"]') + .not('[data-node-type="n8n-nodes-base.stickyNote"]'), ), canvasNodeByName: (nodeName: string) => this.getters.canvasNodes().filter(`:contains(${nodeName})`), diff --git a/packages/editor-ui/src/components/canvas/elements/nodes/render-types/CanvasNodeStickyNote.vue b/packages/editor-ui/src/components/canvas/elements/nodes/render-types/CanvasNodeStickyNote.vue index d3852a81ca..969c97311f 100644 --- a/packages/editor-ui/src/components/canvas/elements/nodes/render-types/CanvasNodeStickyNote.vue +++ b/packages/editor-ui/src/components/canvas/elements/nodes/render-types/CanvasNodeStickyNote.vue @@ -103,7 +103,7 @@ onBeforeUnmount(() => { v-bind="$attrs" :id="id" :class="classes" - data-test-id="canvas-sticky-note-node" + data-test-id="sticky" :height="renderOptions.height" :width="renderOptions.width" :model-value="renderOptions.content" diff --git a/packages/editor-ui/src/components/canvas/elements/nodes/render-types/__snapshots__/CanvasNodeStickyNote.test.ts.snap b/packages/editor-ui/src/components/canvas/elements/nodes/render-types/__snapshots__/CanvasNodeStickyNote.test.ts.snap index 211bab169f..658e31dc1e 100644 --- a/packages/editor-ui/src/components/canvas/elements/nodes/render-types/__snapshots__/CanvasNodeStickyNote.test.ts.snap +++ b/packages/editor-ui/src/components/canvas/elements/nodes/render-types/__snapshots__/CanvasNodeStickyNote.test.ts.snap @@ -9,7 +9,7 @@ exports[`CanvasNodeStickyNote > should render node correctly 1`] = `
-