mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
test(editor): Add e2e tests for executions preview (#5458)
* ✅ Added initial tests for executions preview * 🔥 Removing unneeded actions * 👌 Renaming test suite, moving mock executions logic to util function
This commit is contained in:
committed by
GitHub
parent
856238721a
commit
3b9eec77ec
40
cypress/e2e/20-workflow-executions.cy.ts
Normal file
40
cypress/e2e/20-workflow-executions.cy.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
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();
|
||||
workflowPage.actions.visit();
|
||||
cy.waitForLoad();
|
||||
cy.createFixtureWorkflow('Test_workflow_4_executions_view.json', `My test workflow`);
|
||||
createMockExecutions();
|
||||
});
|
||||
|
||||
it('should render executions tab correctly', () => {
|
||||
cy.waitForLoad();
|
||||
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);
|
||||
executionsTab.actions.switchToExecutionsTab();
|
||||
cy.waitForLoad();
|
||||
}
|
||||
Reference in New Issue
Block a user