feat(editor): Relocate workflow ID expression notice (no-changelog) (#12942)

This commit is contained in:
Milorad FIlipović
2025-01-31 12:32:18 +01:00
committed by GitHub
parent 1ca6a9799a
commit 066908060f
8 changed files with 488 additions and 5 deletions

View File

@@ -549,4 +549,45 @@ describe('WorkflowDataProxy', () => {
expect(() => getFromAIProxy().$fromAI('invalid!')).toThrow(ExpressionError);
});
});
describe('$rawParameter', () => {
const fixture = loadFixture('rawParameter');
const proxy = getProxyFromFixture(fixture.workflow, fixture.run, 'Execute Workflow', 'manual', {
connectionType: NodeConnectionType.Main,
throwOnMissingExecutionData: false,
runIndex: 0,
});
test('returns simple raw parameter value', () => {
expect(proxy.$rawParameter.options).toEqual({
waitForSubWorkflow: '={{ true }}',
});
});
test('returns raw parameter value for resource locator values', () => {
expect(proxy.$rawParameter.workflowId).toEqual('={{ $json.foo }}');
});
test('returns raw parameter value when there is no run data', () => {
const noRunDataProxy = getProxyFromFixture(
fixture.workflow,
{
data: { resultData: { runData: {} } },
mode: 'manual',
startedAt: new Date(),
status: 'success',
},
'Execute Workflow',
'manual',
{
connectionType: NodeConnectionType.Main,
throwOnMissingExecutionData: false,
runIndex: 0,
},
);
expect(noRunDataProxy.$rawParameter.options).toEqual({
waitForSubWorkflow: '={{ true }}',
});
});
});
});