mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
354edf6886
* feat(editor): Bring new users to empty canvas * Fix failing e2e tests and revert CLI implementation * Revert editor-ui Interface changes * Try to mock /settings and /active * Revert canvas test changes, reload after executions in 20-workflow-executions * Make sure we include manual executiosn before running them in 20-workflow-executions * Make sure to re-init node view when replacing empty workflows route, show phantom loader
49 lines
1.6 KiB
TypeScript
49 lines
1.6 KiB
TypeScript
import { WorkflowPage } from '../pages';
|
|
import { WorkflowExecutionsTab } from '../pages/workflow-executions-tab';
|
|
|
|
const workflowPage = new WorkflowPage();
|
|
const executionsTab = new WorkflowExecutionsTab();
|
|
|
|
// Test suite for executions tab
|
|
describe('Current Workflow Executions', () => {
|
|
before(() => {
|
|
cy.resetAll();
|
|
cy.skipSetup();
|
|
});
|
|
|
|
beforeEach(() => {
|
|
workflowPage.actions.visit();
|
|
cy.createFixtureWorkflow('Test_workflow_4_executions_view.json', `My test workflow`);
|
|
createMockExecutions();
|
|
});
|
|
|
|
it('should render executions tab correctly', () => {
|
|
cy.intercept('GET', '/rest/executions?filter=*').as('getExecutions');
|
|
cy.intercept('GET', '/rest/executions-current?filter=*').as('getCurrentExecutions');
|
|
|
|
executionsTab.actions.switchToExecutionsTab();
|
|
|
|
cy.wait(['@getExecutions', '@getCurrentExecutions']);
|
|
|
|
executionsTab.getters.executionListItems().should('have.length', 11);
|
|
executionsTab.getters.successfulExecutionListItems().should('have.length', 9);
|
|
executionsTab.getters.failedExecutionListItems().should('have.length', 2);
|
|
executionsTab.getters
|
|
.executionListItems()
|
|
.first()
|
|
.invoke('attr', 'class')
|
|
.should('match', /_active_/);
|
|
});
|
|
});
|
|
|
|
const createMockExecutions = () => {
|
|
workflowPage.actions.turnOnManualExecutionSaving();
|
|
executionsTab.actions.createManualExecutions(5);
|
|
// Make some failed executions by enabling Code node with syntax error
|
|
executionsTab.actions.toggleNodeEnabled('Error');
|
|
executionsTab.actions.createManualExecutions(2);
|
|
// Then add some more successful ones
|
|
executionsTab.actions.toggleNodeEnabled('Error');
|
|
executionsTab.actions.createManualExecutions(4);
|
|
};
|