test(editor): Add e2e test cases for the logs view (#15060)

This commit is contained in:
Suguru Inoue
2025-05-08 05:59:25 +02:00
committed by GitHub
parent 662358cc43
commit abdbe50907
11 changed files with 448 additions and 58 deletions

View File

@@ -0,0 +1,66 @@
{
"nodes": [
{
"parameters": {
"options": {}
},
"id": "5eb6b347-b34e-4112-9601-f7aa94f26575",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [0, 0],
"webhookId": "4fb58136-3481-494a-a30f-d9e064dac186"
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.9,
"position": [220, 0],
"id": "32534841-9474-4890-9998-65d6a56bdf0c",
"name": "AI Agent"
},
{
"parameters": {
"response": "Hello from **e2e** model!!!"
},
"type": "@n8n/n8n-nodes-langchain.lmChatE2eTest",
"typeVersion": 1,
"position": [308, 220],
"id": "2f239d5b-95ef-4949-92b6-5a7541e1029f",
"name": "E2E Chat Model"
}
],
"connections": {
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [[]]
},
"E2E Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"instanceId": "14f5bd03485879885c6d92999d35d4d24556536fa2b675f932eb27193691e2b2"
}
}

View File

@@ -8,8 +8,8 @@
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [-900, 60],
"id": "e6b8fc7c-442e-4283-a0cd-604dc7c9e816",
"position": [0, 0],
"id": "4c4f02e3-f0cc-4e1a-b084-9888dd75ccaf",
"name": "Schedule Trigger"
},
{
@@ -38,8 +38,8 @@
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [-460, 135],
"id": "f5c96b5b-9e22-4348-a258-fdb0417f5ff5",
"position": [660, 80],
"id": "3273dcdb-845c-43cc-8ed0-ffaef7b68b1c",
"name": "If"
},
{
@@ -58,8 +58,8 @@
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [-240, 60],
"id": "2a6fc40d-5d8c-4c35-bf53-ee910267619f",
"position": [880, 0],
"id": "0522012f-fe99-41e0-ba19-7e18f22758d9",
"name": "Edit Fields"
},
{
@@ -68,9 +68,20 @@
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [-680, 60],
"id": "12ae07e7-be34-43b6-806b-4c24be169ee6",
"position": [440, 0],
"id": "268c2da4-23c8-46c5-8992-37a92b8e4aad",
"name": "Code"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [220, 0],
"id": "0e2d1621-607d-4d53-98a3-07afc0d6230d",
"name": "Edit Fields1",
"disabled": true
}
],
"connections": {
@@ -78,7 +89,7 @@
"main": [
[
{
"node": "Code",
"node": "Edit Fields1",
"type": "main",
"index": 0
}
@@ -118,10 +129,21 @@
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"instanceId": "db1f26b45a71ad9a8df79dde8d35bf1be13616c3b23eb55be8ecf642dd31500c"
"instanceId": "ddb4b2493e5f30d4af3bb43dd3c9acf1f60cbaa91c89e84d2967725474533c77"
}
}

View File

@@ -0,0 +1,110 @@
{
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [0, -10],
"id": "cc68bd44-e150-403c-afaf-bd0bac0459dd",
"name": "When clicking Test workflow"
},
{
"parameters": {
"jsCode": "return [{data:1},{data:2},{data:3}]"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [220, -10],
"id": "461b130c-0efb-4201-8210-d5e794e88ed8",
"name": "Code"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [440, -10],
"id": "16860d82-1b2c-4882-ad76-43cc2042d695",
"name": "Loop Over Items"
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [660, 40],
"id": "9ede6c97-a3c5-4f42-adcc-dfe66fc7a2a8",
"name": "Wait",
"webhookId": "36d32e2d-a9cf-4dc7-b138-70d7966c96d7"
},
{
"parameters": {
"jsCode": "throw Error('test!!!')"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [660, -160],
"id": "05ad4f4d-10fc-4bec-9145-0e5c20f455c4",
"name": "Code1"
}
],
"connections": {
"When clicking Test workflow": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Code1",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"instanceId": "74f18f142a6ddf6880a6f8c5b30685f621743a7a66d8d94c8f164937f4dd5515"
}
}