fix: Remove external call and simplify test (no-changelog) (#15174)

This commit is contained in:
shortstacked
2025-05-07 12:21:57 +01:00
committed by GitHub
parent 0659ba957c
commit 1122ee7ec9
2 changed files with 59 additions and 88 deletions

View File

@@ -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);
});