mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
ci: Remove flaky e2e tests from past 30 days (no-changelog) (#10131)
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
import { WorkflowPage, WorkflowsPage, NDV } from '../pages';
|
||||
import { BACKEND_BASE_URL } from '../constants';
|
||||
import { getVisibleSelect } from '../utils';
|
||||
import type { ExecutionResponse } from '../types';
|
||||
import { WorkflowPage, NDV } from '../pages';
|
||||
|
||||
const workflowsPage = new WorkflowsPage();
|
||||
const workflowPage = new WorkflowPage();
|
||||
const ndv = new NDV();
|
||||
|
||||
@@ -19,53 +15,4 @@ describe('Schedule Trigger node', () => {
|
||||
ndv.getters.outputPanel().contains('timestamp');
|
||||
ndv.getters.backToCanvas().click();
|
||||
});
|
||||
|
||||
it('should execute once per second when activated', () => {
|
||||
workflowPage.actions.renameWorkflow('Schedule Trigger Workflow');
|
||||
workflowPage.actions.addInitialNodeToCanvas('Schedule Trigger');
|
||||
workflowPage.actions.openNode('Schedule Trigger');
|
||||
|
||||
cy.getByTestId('parameter-input-field').click();
|
||||
getVisibleSelect().find('.option-headline').contains('Seconds').click();
|
||||
cy.getByTestId('parameter-input-secondsInterval').clear().type('1');
|
||||
|
||||
ndv.getters.backToCanvas().click();
|
||||
workflowPage.actions.saveWorkflowOnButtonClick();
|
||||
workflowPage.actions.activateWorkflow();
|
||||
workflowPage.getters.activatorSwitch().should('have.class', 'is-checked');
|
||||
|
||||
cy.url().then((url) => {
|
||||
const workflowId = url.split('/').pop();
|
||||
|
||||
cy.wait(1200);
|
||||
cy.request<ExecutionResponse>('GET', `${BACKEND_BASE_URL}/rest/executions`).then(
|
||||
(response) => {
|
||||
expect(response.status).to.eq(200);
|
||||
expect(workflowId).to.not.be.undefined;
|
||||
expect(response.body.data.results.length).to.be.greaterThan(0);
|
||||
const matchingExecutions = response.body.data.results.filter(
|
||||
(execution) => execution.workflowId === workflowId,
|
||||
);
|
||||
expect(matchingExecutions).to.have.length(1);
|
||||
|
||||
cy.wait(1200);
|
||||
cy.request<ExecutionResponse>('GET', `${BACKEND_BASE_URL}/rest/executions`).then(
|
||||
(response1) => {
|
||||
expect(response1.status).to.eq(200);
|
||||
expect(response1.body.data.results.length).to.be.greaterThan(0);
|
||||
const matchingExecutions1 = response1.body.data.results.filter(
|
||||
(execution: any) => execution.workflowId === workflowId,
|
||||
);
|
||||
expect(matchingExecutions1).to.have.length(2);
|
||||
|
||||
workflowPage.actions.activateWorkflow();
|
||||
workflowPage.getters.activatorSwitch().should('not.have.class', 'is-checked');
|
||||
cy.visit(workflowsPage.url);
|
||||
workflowsPage.actions.deleteWorkFlow('Schedule Trigger Workflow');
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user