Skip to content

Commit

Permalink
fix(editor): Make sticky node content parameter non require to suppor…
Browse files Browse the repository at this point in the history
…t empty stickies (#9192)
  • Loading branch information
RicardoE105 authored Apr 24, 2024
1 parent 93f23ea commit f6142ff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions cypress/e2e/25-stickies.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,20 @@ describe('Canvas Actions', () => {
expect($el).to.have.css('z-index', '-158');
});
});

it('Empty sticky should not error when activating workflow', () => {
workflowPage.actions.addSticky();

workflowPage.getters.stickies().should('have.length', 1);

workflowPage.getters.stickies().dblclick();

workflowPage.actions.clearSticky();

workflowPage.actions.addNodeToCanvas('Schedule Trigger');

workflowPage.actions.activateWorkflow();
});
});

type Position = {
Expand Down
3 changes: 3 additions & 0 deletions cypress/pages/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ export class WorkflowPage extends BasePage {
editSticky: (content: string) => {
this.getters.stickies().dblclick().find('textarea').clear().type(content).type('{esc}');
},
clearSticky: () => {
this.getters.stickies().dblclick().find('textarea').clear().type('{esc}');
},
shouldHaveWorkflowName: (name: string) => {
this.getters.workflowNameInputContainer().invoke('attr', 'title').should('include', name);
},
Expand Down
1 change: 0 additions & 1 deletion packages/nodes-base/nodes/StickyNote/StickyNote.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export class StickyNote implements INodeType {
displayName: 'Content',
name: 'content',
type: 'string',
required: true,
default:
"## I'm a note \n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)",
},
Expand Down

0 comments on commit f6142ff

Please sign in to comment.