2023-01-18 06:48:36 -08:00
|
|
|
import { WorkflowPage, WorkflowsPage, NDV } from '../pages';
|
2022-11-25 04:09:44 -08:00
|
|
|
|
2023-01-18 06:48:36 -08:00
|
|
|
const workflowsPage = new WorkflowsPage();
|
|
|
|
const workflowPage = new WorkflowPage();
|
2023-01-26 23:51:32 -08:00
|
|
|
const ndv = new NDV();
|
2022-11-25 04:09:44 -08:00
|
|
|
|
|
|
|
describe('HTTP Request node', () => {
|
2023-01-26 23:51:32 -08:00
|
|
|
beforeEach(() => {
|
2022-11-28 09:11:33 -08:00
|
|
|
cy.resetAll();
|
2022-11-25 04:09:44 -08:00
|
|
|
cy.skipSetup();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should make a request with a URL and receive a response', () => {
|
2023-01-26 23:51:32 -08:00
|
|
|
cy.visit(workflowsPage.url);
|
|
|
|
|
2023-01-18 06:48:36 -08:00
|
|
|
workflowsPage.actions.createWorkflowFromCard();
|
|
|
|
workflowPage.actions.addInitialNodeToCanvas('Manual Trigger');
|
|
|
|
workflowPage.actions.addNodeToCanvas('HTTP Request');
|
|
|
|
workflowPage.actions.openNode('HTTP Request');
|
|
|
|
ndv.actions.typeIntoParameterInput('url', 'https://catfact.ninja/fact');
|
2022-11-25 04:09:44 -08:00
|
|
|
|
2023-01-18 06:48:36 -08:00
|
|
|
ndv.actions.execute();
|
2022-11-25 04:09:44 -08:00
|
|
|
|
2023-01-18 06:48:36 -08:00
|
|
|
ndv.getters.outputPanel().contains('fact');
|
2022-11-25 04:09:44 -08:00
|
|
|
});
|
|
|
|
});
|