mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
test: Test that pinned data is not used in production executions (#8439)
This commit is contained in:
parent
97b398871d
commit
c9b3649b7e
|
@ -157,15 +157,33 @@ describe('Data pinning', () => {
|
||||||
|
|
||||||
workflowPage.actions.executeWorkflow();
|
workflowPage.actions.executeWorkflow();
|
||||||
|
|
||||||
cy.request('GET', `${BACKEND_BASE_URL}/webhook-test/b0d79ddb-df2d-49b1-8555-9fa2b482608f`).then((response) => {
|
cy.request('GET', `${BACKEND_BASE_URL}/webhook-test/b0d79ddb-df2d-49b1-8555-9fa2b482608f`).then(
|
||||||
expect(response.status).to.eq(200);
|
(response) => {
|
||||||
});
|
expect(response.status).to.eq(200);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
workflowPage.actions.openNode('End');
|
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');
|
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) {
|
function setExpressionOnStringValueInSet(expression: string) {
|
||||||
|
|
Loading…
Reference in a new issue