fix(editor): Fix unnecessary execution of nodes when there is pin data (#8567)

Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
Csaba Tuncsik
2024-02-16 17:24:07 +01:00
committed by GitHub
parent 9c0fe413d9
commit 46fe544b9a
3 changed files with 224 additions and 41 deletions

View File

@@ -489,4 +489,31 @@ describe('Execution', () => {
.should('have.class', 'has-run');
});
});
it.only('should send proper payload for node rerun', () => {
cy.createFixtureWorkflow(
'Multiple_trigger_node_rerun.json',
`Multiple trigger node rerun ${uuid()}`,
);
workflowPage.getters.zoomToFitButton().click();
workflowPage.getters.executeWorkflowButton().click();
workflowPage.getters.clearExecutionDataButton().should('be.visible');
cy.intercept('POST', '/rest/workflows/run').as('workflowRun');
workflowPage.getters
.canvasNodeByName('do something with them')
.findChildByTestId('execute-node-button')
.click({ force: true });
cy.wait('@workflowRun').then((interception) => {
expect(interception.request.body).to.have.property('runData').that.is.an('object');
const expectedKeys = ['When clicking "Test workflow"', 'fetch 5 random users'];
expect(Object.keys(interception.request.body.runData)).to.have.lengthOf(expectedKeys.length);
expect(interception.request.body.runData).to.include.all.keys(expectedKeys);
});
});
});