mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(editor): Add HTTP request nodes for credentials without a node (#7157)
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { WorkflowPage, NDV } from '../pages';
|
||||
import { NodeCreator } from '../pages/features/node-creator';
|
||||
|
||||
const workflowPage = new WorkflowPage();
|
||||
const nodeCreatorFeature = new NodeCreator();
|
||||
const ndv = new NDV();
|
||||
|
||||
describe('HTTP Request node', () => {
|
||||
@@ -18,4 +20,40 @@ describe('HTTP Request node', () => {
|
||||
|
||||
ndv.getters.outputPanel().contains('fact');
|
||||
});
|
||||
|
||||
describe('Credential-only HTTP Request Node variants', () => {
|
||||
it('should render a modified HTTP Request Node', () => {
|
||||
workflowPage.actions.addInitialNodeToCanvas('Manual');
|
||||
|
||||
workflowPage.getters.nodeCreatorPlusButton().click();
|
||||
workflowPage.getters.nodeCreatorSearchBar().type('VirusTotal');
|
||||
|
||||
expect(nodeCreatorFeature.getters.nodeItemName().first().should('have.text', 'VirusTotal'));
|
||||
expect(
|
||||
nodeCreatorFeature.getters
|
||||
.nodeItemDescription()
|
||||
.first()
|
||||
.should('have.text', 'HTTP request'),
|
||||
);
|
||||
|
||||
nodeCreatorFeature.actions.selectNode('VirusTotal');
|
||||
expect(ndv.getters.nodeNameContainer().should('contain.text', 'VirusTotal HTTP Request'));
|
||||
expect(
|
||||
ndv.getters
|
||||
.parameterInput('url')
|
||||
.find('input')
|
||||
.should('contain.value', 'https://www.virustotal.com/api/v3/'),
|
||||
);
|
||||
|
||||
// These parameters exist for normal HTTP Request Node, but are hidden for credential-only variants
|
||||
expect(ndv.getters.parameterInput('authentication').should('not.exist'));
|
||||
expect(ndv.getters.parameterInput('nodeCredentialType').should('not.exist'));
|
||||
|
||||
expect(
|
||||
workflowPage.getters
|
||||
.nodeCredentialsLabel()
|
||||
.should('contain.text', 'Credential for VirusTotal'),
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user