mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix: Remove external call and simplify test (no-changelog) (#15174)
This commit is contained in:
@@ -473,17 +473,6 @@ describe('Execution', () => {
|
||||
});
|
||||
|
||||
it('should send proper payload for node rerun', () => {
|
||||
const mockUserData = [
|
||||
{
|
||||
firstname: 'Lawrence',
|
||||
lastname: 'Kertzmann',
|
||||
},
|
||||
];
|
||||
cy.intercept('GET', 'https://internal.users.n8n.cloud/webhook/random-data-api', {
|
||||
statusCode: 200,
|
||||
body: mockUserData,
|
||||
}).as('getRandomUsers');
|
||||
|
||||
cy.createFixtureWorkflow('Multiple_trigger_node_rerun.json', 'Multiple trigger node rerun');
|
||||
|
||||
workflowPage.getters.zoomToFitButton().click();
|
||||
@@ -494,19 +483,16 @@ describe('Execution', () => {
|
||||
cy.intercept('POST', '/rest/workflows/**/run?**').as('workflowRun');
|
||||
|
||||
workflowPage.getters
|
||||
.canvasNodeByName('do something with them')
|
||||
.canvasNodeByName('Process The Data')
|
||||
.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',
|
||||
'do something with them',
|
||||
];
|
||||
|
||||
const { runData } = interception.request.body as Record<string, object>;
|
||||
const expectedKeys = ['Start Manually', 'Edit Fields', 'Process The Data'];
|
||||
|
||||
const { runData } = interception.request.body;
|
||||
expect(Object.keys(runData)).to.have.lengthOf(expectedKeys.length);
|
||||
expect(runData).to.include.all.keys(expectedKeys);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user