-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): Fix issue that pinnedData is not used with Test-Webhooks (#…
…8123) ## Summary When a workflow gets started via a Test-Webhook the pinned data does get ignored and the nodes executed anyway. ## Related tickets and issues > Include links to **Linear ticket** or Github issue or Community forum post. Important in order to close *automatically* and provide context to reviewers. ## Review / Merge checklist - [x] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [X] Tests included. > A bug is not considered fixed, unless a test is added to prevent it from happening again. > A feature is not complete without tests. --------- Co-authored-by: Mutasem Aldmour <[email protected]>
- Loading branch information
Showing
4 changed files
with
173 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
151 changes: 151 additions & 0 deletions
151
cypress/fixtures/Test_workflow_webhook_with_pin_data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
{ | ||
"name": "PinData Test", | ||
"nodes": [ | ||
{ | ||
"parameters": {}, | ||
"id": "0a60e507-7f34-41c0-a0f9-697d852033b6", | ||
"name": "When clicking \"Execute Workflow\"", | ||
"type": "n8n-nodes-base.manualTrigger", | ||
"typeVersion": 1, | ||
"position": [ | ||
780, | ||
320 | ||
] | ||
}, | ||
{ | ||
"parameters": { | ||
"path": "b0d79ddb-df2d-49b1-8555-9fa2b482608f", | ||
"responseMode": "lastNode", | ||
"options": {} | ||
}, | ||
"id": "66425ce3-450d-4aa6-a53b-a701ab89c2de", | ||
"name": "Webhook", | ||
"type": "n8n-nodes-base.webhook", | ||
"typeVersion": 1.1, | ||
"position": [ | ||
780, | ||
540 | ||
], | ||
"webhookId": "b0d79ddb-df2d-49b1-8555-9fa2b482608f" | ||
}, | ||
{ | ||
"parameters": { | ||
"fields": { | ||
"values": [ | ||
{ | ||
"name": "nodeData", | ||
"stringValue": "init" | ||
} | ||
] | ||
}, | ||
"include": "none", | ||
"options": {} | ||
}, | ||
"id": "3211b3c5-49e9-4694-8f86-7a5783bc653a", | ||
"name": "Init Data", | ||
"type": "n8n-nodes-base.set", | ||
"typeVersion": 3.2, | ||
"position": [ | ||
1000, | ||
320 | ||
] | ||
}, | ||
{ | ||
"parameters": { | ||
"fields": { | ||
"values": [ | ||
{ | ||
"name": "nodeData", | ||
"stringValue": "pin" | ||
} | ||
] | ||
}, | ||
"options": {} | ||
}, | ||
"id": "97b31120-4720-4632-9d35-356f345119f7", | ||
"name": "Pin Data", | ||
"type": "n8n-nodes-base.set", | ||
"typeVersion": 3.2, | ||
"position": [ | ||
1240, | ||
320 | ||
] | ||
}, | ||
{ | ||
"parameters": {}, | ||
"id": "1ee7be4f-7006-43bf-bb0c-29db3058a399", | ||
"name": "End", | ||
"type": "n8n-nodes-base.noOp", | ||
"typeVersion": 1, | ||
"position": [ | ||
1460, | ||
320 | ||
] | ||
} | ||
], | ||
"pinData": { | ||
"Pin Data": [ | ||
{ | ||
"json": { | ||
"nodeData": "pin-overwritten" | ||
} | ||
} | ||
] | ||
}, | ||
"connections": { | ||
"When clicking \"Execute Workflow\"": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "Init Data", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
}, | ||
"Webhook": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "Init Data", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
}, | ||
"Init Data": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "Pin Data", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
}, | ||
"Pin Data": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "End", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
"active": false, | ||
"settings": { | ||
"executionOrder": "v1" | ||
}, | ||
"versionId": "ded8577a-3ed2-4611-842c-a7922ec58b98", | ||
"id": "weofVLZo0ssmPDrV", | ||
"meta": { | ||
"instanceId": "021d3c82ba2d3bc090cbf4fc81c9312668bcc34297e022bb3438c5c88a43a5ff" | ||
}, | ||
"tags": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters