fix(editor): Make sticky node content parameter non require to support empty stickies (#9192)

This commit is contained in:
Ricardo Espinoza 2024-04-23 21:56:33 -04:00 committed by GitHub
parent 93f23ea4b2
commit f6142ff275
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 1 deletions

View file

@ -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 = {

View file

@ -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);
},

View file

@ -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/)",
},