fix(editor): Fix node runData and pinned data check on manual run (#8669)
This commit is contained in:
@@ -490,7 +490,7 @@ describe('Execution', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it.only('should send proper payload for node rerun', () => {
|
||||
it('should send proper payload for node rerun', () => {
|
||||
cy.createFixtureWorkflow(
|
||||
'Multiple_trigger_node_rerun.json',
|
||||
`Multiple trigger node rerun ${uuid()}`,
|
||||
@@ -516,4 +516,57 @@ describe('Execution', () => {
|
||||
expect(interception.request.body.runData).to.include.all.keys(expectedKeys);
|
||||
});
|
||||
});
|
||||
|
||||
it('should send proper payload for manual node run', () => {
|
||||
cy.createFixtureWorkflow(
|
||||
'Check_manual_node_run_for_pinned_and_rundata.json',
|
||||
`Check manual node run for pinned and rundata ${uuid()}`,
|
||||
);
|
||||
|
||||
workflowPage.getters.zoomToFitButton().click();
|
||||
|
||||
cy.intercept('POST', '/rest/workflows/run').as('workflowRun');
|
||||
|
||||
workflowPage.getters
|
||||
.canvasNodeByName('If')
|
||||
.findChildByTestId('execute-node-button')
|
||||
.click({ force: true });
|
||||
|
||||
cy.wait('@workflowRun').then((interception) => {
|
||||
expect(interception.request.body).not.to.have.property('runData').that.is.an('object');
|
||||
expect(interception.request.body).to.have.property('pinData').that.is.an('object');
|
||||
const expectedPinnedDataKeys = ['Webhook'];
|
||||
|
||||
expect(Object.keys(interception.request.body.pinData)).to.have.lengthOf(
|
||||
expectedPinnedDataKeys.length,
|
||||
);
|
||||
expect(interception.request.body.pinData).to.include.all.keys(expectedPinnedDataKeys);
|
||||
});
|
||||
|
||||
workflowPage.getters.clearExecutionDataButton().should('be.visible');
|
||||
|
||||
cy.intercept('POST', '/rest/workflows/run').as('workflowRun');
|
||||
|
||||
workflowPage.getters
|
||||
.canvasNodeByName('NoOp2')
|
||||
.findChildByTestId('execute-node-button')
|
||||
.click({ force: true });
|
||||
|
||||
cy.wait('@workflowRun').then((interception) => {
|
||||
expect(interception.request.body).to.have.property('runData').that.is.an('object');
|
||||
expect(interception.request.body).to.have.property('pinData').that.is.an('object');
|
||||
const expectedPinnedDataKeys = ['Webhook'];
|
||||
const expectedRunDataKeys = ['If', 'Webhook'];
|
||||
|
||||
expect(Object.keys(interception.request.body.pinData)).to.have.lengthOf(
|
||||
expectedPinnedDataKeys.length,
|
||||
);
|
||||
expect(interception.request.body.pinData).to.include.all.keys(expectedPinnedDataKeys);
|
||||
|
||||
expect(Object.keys(interception.request.body.runData)).to.have.lengthOf(
|
||||
expectedRunDataKeys.length,
|
||||
);
|
||||
expect(interception.request.body.runData).to.include.all.keys(expectedRunDataKeys);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user