mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
fix(editor): Update node execution itemCount to support multiple outputs (no-changelog) (#19646)
This commit is contained in:
@@ -118,18 +118,27 @@ export function runMockWorkflowExecution({
|
||||
data: pick(nodeRunData, ['startTime', 'executionIndex', 'source', 'hints']),
|
||||
});
|
||||
const { data: _, ...taskData } = nodeRunData;
|
||||
const itemCount = nodeRunData.data?.main?.[0]?.length ?? 0;
|
||||
const itemCountByConnectionType: Record<string, number[]> = {};
|
||||
for (const connectionType of Object.keys(nodeRunData.data ?? {})) {
|
||||
const connectionData = nodeRunData.data?.[connectionType];
|
||||
if (Array.isArray(connectionData)) {
|
||||
itemCountByConnectionType[connectionType] = connectionData.map((d) => (d ? d.length : 0));
|
||||
} else {
|
||||
itemCountByConnectionType[connectionType] = [0];
|
||||
}
|
||||
}
|
||||
|
||||
cy.push('nodeExecuteAfter', {
|
||||
executionId,
|
||||
nodeName,
|
||||
data: taskData,
|
||||
itemCount,
|
||||
itemCountByConnectionType,
|
||||
});
|
||||
cy.push('nodeExecuteAfterData', {
|
||||
executionId,
|
||||
nodeName,
|
||||
data: nodeRunData,
|
||||
itemCount,
|
||||
itemCountByConnectionType,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user