feat(core): Fix populating of node custom api call options (#5303)

* feat(core): Fix populating of node custom api call options

* lint fixes

* Adress PR comments

* Add e2e test and only inject custom API options for latest version

* Make sure to injectCustomApiCallOption for the latest version of node
This commit is contained in:
OlegIvaniv
2023-02-02 14:53:08 +01:00
committed by GitHub
parent 6cba652ff9
commit e58bc41d24
8 changed files with 78 additions and 85 deletions

View File

@@ -87,4 +87,16 @@ describe('NDV', () => {
cy.get('[class*=hasIssues]').should('have.length', 1);
});
});
it('should show http node hint if node has custom api option', () => {
workflowPage.actions.addNodeToCanvas('Manual Trigger');
workflowPage.actions.addNodeToCanvas('Slack', true, true);
ndv.getters.httpRequestNotice().should('not.exist');
ndv.getters.parameterInput('operation').click();
ndv.getters.parameterInput('operation').contains('Custom API').click();
ndv.getters.httpRequestNotice().should('be.visible');
ndv.getters.parameterInput('operation').click();
ndv.getters.parameterInput('operation').contains('Post').click();
ndv.getters.httpRequestNotice().should('not.exist');
});
});

View File

@@ -27,6 +27,7 @@ export class NDV extends BasePage {
parameterInput: (parameterName: string) => cy.getByTestId(`parameter-input-${parameterName}`),
nodeNameContainer: () => cy.getByTestId('node-title-container'),
nodeRenameInput: () => cy.getByTestId('node-rename-input'),
httpRequestNotice: () => cy.getByTestId('node-parameters-http-notice'),
};
actions = {