ci: Add test for wait node (no-changelog) (#5414)

This commit is contained in:
Jon 2023-04-12 15:07:18 +01:00 committed by GitHub
parent d288a918f1
commit e6ad17ec64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 147 additions and 0 deletions

View file

@ -0,0 +1,4 @@
import { testWorkflows, getWorkflowFilenames } from '../../../test/nodes/Helpers';
const workflows = getWorkflowFilenames(__dirname);
describe('Execute Wait Node', () => testWorkflows(workflows));

View file

@ -0,0 +1,143 @@
{
"name": "[Unit Test] Wait Node",
"nodes": [
{
"parameters": {},
"id": "d24d60c0-fe08-4c95-afc2-51b92890667b",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [500, 400]
},
{
"parameters": {
"amount": 2,
"unit": "seconds"
},
"id": "244f011e-bf10-4745-9dac-1ef0a1ac8167",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [900, 400],
"webhookId": "35edc971-c3e4-48cf-835d-4d73a4fd1fd8"
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $now.toFormat('ss') }}",
"value2": "={{ $json.start }}"
}
]
}
},
"id": "d5977620-7f73-4cbe-a354-03658462167f",
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [1120, 400]
},
{
"parameters": {
"values": {
"number": [
{
"name": "start",
"value": "={{ $now.plus({seconds: 2}).toFormat('ss') }}"
}
]
},
"options": {}
},
"id": "7f88ca0b-b743-414e-ae03-d85c0efcbece",
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [700, 400]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"boolean": [
{
"name": "success",
"value": true
}
]
},
"options": {}
},
"id": "d55dc8cf-7e5e-4282-854b-9047e179a06b",
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [1340, 380]
}
],
"pinData": {
"Set1": [
{
"json": {
"success": true
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Set1",
"type": "main",
"index": 0
}
],
[]
]
}
},
"active": false,
"settings": {},
"versionId": "1bd65d2e-3a90-478d-89ae-319ceed2dbf8",
"id": "391",
"meta": {
"instanceId": "REMOVED"
},
"tags": []
}