mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
fix(editor): Make Webhook node pinnable (#9047)
This commit is contained in:
parent
dc42ac17a6
commit
042aa62fc2
|
@ -69,6 +69,16 @@ describe('Data pinning', () => {
|
||||||
ndv.getters.outputTbodyCell(1, 0).should('include.text', 1);
|
ndv.getters.outputTbodyCell(1, 0).should('include.text', 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should display pin data edit button for Webhook node', () => {
|
||||||
|
workflowPage.actions.addInitialNodeToCanvas('Webhook', { keepNdvOpen: true });
|
||||||
|
|
||||||
|
ndv.getters
|
||||||
|
.runDataPaneHeader()
|
||||||
|
.find('button')
|
||||||
|
.filter(':visible')
|
||||||
|
.should('have.attr', 'title', 'Edit Output');
|
||||||
|
});
|
||||||
|
|
||||||
it('Should be duplicating pin data when duplicating node', () => {
|
it('Should be duplicating pin data when duplicating node', () => {
|
||||||
workflowPage.actions.addInitialNodeToCanvas('Schedule Trigger');
|
workflowPage.actions.addInitialNodeToCanvas('Schedule Trigger');
|
||||||
workflowPage.actions.addNodeToCanvas(EDIT_FIELDS_SET_NODE_NAME, true, true);
|
workflowPage.actions.addNodeToCanvas(EDIT_FIELDS_SET_NODE_NAME, true, true);
|
||||||
|
|
|
@ -36,7 +36,13 @@ export function useNodeType(
|
||||||
: false;
|
: false;
|
||||||
});
|
});
|
||||||
|
|
||||||
const isMultipleOutputsNodeType = computed(() => (nodeType.value?.outputs ?? []).length > 1);
|
const isMultipleOutputsNodeType = computed(() => {
|
||||||
|
const outputs = nodeType.value?.outputs;
|
||||||
|
|
||||||
|
if (typeof outputs === 'string') return false; // e.g. Webhook node
|
||||||
|
|
||||||
|
return (outputs ?? []).length > 1;
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
nodeType,
|
nodeType,
|
||||||
|
|
Loading…
Reference in a new issue