feat(editor): Add evaluation workflow and enhance workflow selector with pinned data support (#12773)

This commit is contained in:
oleg
2025-01-29 11:03:03 +01:00
committed by GitHub
parent 05b5f95331
commit be967ebec0
11 changed files with 290 additions and 125 deletions

View File

@@ -86,6 +86,8 @@ describe('Workflow Selector Parameter', () => {
cy.stub(win, 'open').as('windowOpen');
});
cy.intercept('POST', '/rest/workflows*').as('createSubworkflow');
ndv.getters.resourceLocator('workflowId').should('be.visible');
ndv.getters.resourceLocatorInput('workflowId').click();
@@ -98,10 +100,20 @@ describe('Workflow Selector Parameter', () => {
getVisiblePopper().findChildByTestId('rlc-item').eq(0).click();
const SAMPLE_SUBWORKFLOW_TEMPLATE_ID = 'VMiAxXa3lCAizGB5f7dVZQSFfg3FtHkdTKvLuupqBls=';
cy.get('@windowOpen').should(
'be.calledWith',
`/workflows/onboarding/${SAMPLE_SUBWORKFLOW_TEMPLATE_ID}?sampleSubWorkflows=0`,
);
cy.wait('@createSubworkflow').then((interception) => {
expect(interception.request.body).to.have.property('name').that.includes('Sub-Workflow');
expect(interception.request.body.nodes).to.be.an('array');
expect(interception.request.body.nodes).to.have.length(2);
expect(interception.request.body.nodes[0]).to.have.property(
'name',
'When Executed by Another Workflow',
);
expect(interception.request.body.nodes[1]).to.have.property(
'name',
'Replace me with your logic',
);
});
cy.get('@windowOpen').should('be.calledWithMatch', /\/workflow\/.+/);
});
});