test: Test that pinned data is not used in production executions (#8439)

This commit is contained in:
Danny Martini 2024-01-29 12:55:35 +01:00 committed by GitHub
parent 97b398871d
commit c9b3649b7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -157,15 +157,33 @@ describe('Data pinning', () => {
workflowPage.actions.executeWorkflow();
cy.request('GET', `${BACKEND_BASE_URL}/webhook-test/b0d79ddb-df2d-49b1-8555-9fa2b482608f`).then((response) => {
expect(response.status).to.eq(200);
});
cy.request('GET', `${BACKEND_BASE_URL}/webhook-test/b0d79ddb-df2d-49b1-8555-9fa2b482608f`).then(
(response) => {
expect(response.status).to.eq(200);
},
);
workflowPage.actions.openNode('End');
ndv.getters.outputTableRow(1).should('exist')
ndv.getters.outputTableRow(1).should('exist');
ndv.getters.outputTableRow(1).should('have.text', 'pin-overwritten');
});
it('should not use pin data in production executions that are started by a webhook', () => {
cy.createFixtureWorkflow('Test_workflow_webhook_with_pin_data.json', 'Test');
workflowPage.actions.activateWorkflow();
cy.request('GET', `${BACKEND_BASE_URL}/webhook/b0d79ddb-df2d-49b1-8555-9fa2b482608f`).then(
(response) => {
expect(response.status).to.eq(200);
// Assert that we get the data hard coded in the edit fields node,
// instead of the data pinned in said node.
expect(response.body).to.deep.equal({
nodeData: 'pin',
});
},
);
});
});
function setExpressionOnStringValueInSet(expression: string) {