diff --git a/cypress/e2e/1-workflows.cy.ts b/cypress/e2e/1-workflows.cy.ts index d10f3ac850..bfa5922c2a 100644 --- a/cypress/e2e/1-workflows.cy.ts +++ b/cypress/e2e/1-workflows.cy.ts @@ -9,7 +9,6 @@ const multipleWorkflowsCount = 5; describe('Workflows', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/10-settings-log-streaming.cy.ts b/cypress/e2e/10-settings-log-streaming.cy.ts index 0126667a69..10b1d4d79f 100644 --- a/cypress/e2e/10-settings-log-streaming.cy.ts +++ b/cypress/e2e/10-settings-log-streaming.cy.ts @@ -10,7 +10,6 @@ const settingsLogStreamingPage = new SettingsLogStreamingPage(); describe('Log Streaming Settings', () => { before(() => { - cy.resetAll(); cy.setup({ email, firstName, lastName, password }); }); diff --git a/cypress/e2e/10-undo-redo.cy.ts b/cypress/e2e/10-undo-redo.cy.ts index 8f9b90d68c..90e9e558eb 100644 --- a/cypress/e2e/10-undo-redo.cy.ts +++ b/cypress/e2e/10-undo-redo.cy.ts @@ -11,7 +11,6 @@ const ndv = new NDV(); describe('Undo/Redo', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/11-inline-expression-editor.cy.ts b/cypress/e2e/11-inline-expression-editor.cy.ts index 88fea311d9..4d9a46bb31 100644 --- a/cypress/e2e/11-inline-expression-editor.cy.ts +++ b/cypress/e2e/11-inline-expression-editor.cy.ts @@ -4,7 +4,6 @@ const WorkflowPage = new WorkflowPageClass(); describe('Inline expression editor', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/12-canvas-actions.cy.ts b/cypress/e2e/12-canvas-actions.cy.ts index 518857106f..40bd9d168e 100644 --- a/cypress/e2e/12-canvas-actions.cy.ts +++ b/cypress/e2e/12-canvas-actions.cy.ts @@ -12,7 +12,6 @@ import { WorkflowPage as WorkflowPageClass } from '../pages/workflow'; const WorkflowPage = new WorkflowPageClass(); describe('Canvas Actions', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/12-canvas.cy.ts b/cypress/e2e/12-canvas.cy.ts index 5f2fe8db07..29869e4434 100644 --- a/cypress/e2e/12-canvas.cy.ts +++ b/cypress/e2e/12-canvas.cy.ts @@ -22,7 +22,6 @@ const RENAME_NODE_NAME = 'Something else'; describe('Canvas Node Manipulation and Navigation', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/13-pinning.cy.ts b/cypress/e2e/13-pinning.cy.ts index c278231017..004e728845 100644 --- a/cypress/e2e/13-pinning.cy.ts +++ b/cypress/e2e/13-pinning.cy.ts @@ -11,7 +11,6 @@ const ndv = new NDV(); describe('Data pinning', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/14-data-transformation-expressions.cy.ts b/cypress/e2e/14-data-transformation-expressions.cy.ts index cb08d51e5b..43dbded37a 100644 --- a/cypress/e2e/14-data-transformation-expressions.cy.ts +++ b/cypress/e2e/14-data-transformation-expressions.cy.ts @@ -5,7 +5,6 @@ const ndv = new NDV(); describe('Data transformation expressions', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/14-mapping.cy.ts b/cypress/e2e/14-mapping.cy.ts index 134deeb9fc..b66e909b59 100644 --- a/cypress/e2e/14-mapping.cy.ts +++ b/cypress/e2e/14-mapping.cy.ts @@ -10,7 +10,6 @@ const ndv = new NDV(); describe('Data mapping', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/15-scheduler-node.cy.ts b/cypress/e2e/15-scheduler-node.cy.ts index ae3de65c26..b3ffd430e1 100644 --- a/cypress/e2e/15-scheduler-node.cy.ts +++ b/cypress/e2e/15-scheduler-node.cy.ts @@ -5,11 +5,14 @@ const workflowPage = new WorkflowPage(); const ndv = new NDV(); describe('Schedule Trigger node', async () => { - beforeEach(() => { - cy.resetAll(); + before(() => { cy.skipSetup(); }); + beforeEach(() => { + workflowPage.actions.visit(); + }); + it('should execute and return the execution timestamp', () => { workflowPage.actions.addInitialNodeToCanvas('Schedule Trigger'); workflowPage.actions.openNode('Schedule Trigger'); diff --git a/cypress/e2e/16-webhook-node.cy.ts b/cypress/e2e/16-webhook-node.cy.ts index d2bceaf22f..64556037d8 100644 --- a/cypress/e2e/16-webhook-node.cy.ts +++ b/cypress/e2e/16-webhook-node.cy.ts @@ -92,7 +92,6 @@ const simpleWebhookCall = (options: SimpleWebhookCallOptions) => { describe('Webhook Trigger node', async () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/17-sharing.cy.ts b/cypress/e2e/17-sharing.cy.ts index ddc028fee3..6cfb226005 100644 --- a/cypress/e2e/17-sharing.cy.ts +++ b/cypress/e2e/17-sharing.cy.ts @@ -52,7 +52,6 @@ const users = [ describe('Sharing', () => { before(() => { - cy.resetAll(); cy.setupOwner(instanceOwner); }); diff --git a/cypress/e2e/17-workflow-tags.cy.ts b/cypress/e2e/17-workflow-tags.cy.ts index 8e14897508..d18c48cf7b 100644 --- a/cypress/e2e/17-workflow-tags.cy.ts +++ b/cypress/e2e/17-workflow-tags.cy.ts @@ -2,51 +2,52 @@ import { WorkflowPage } from '../pages'; const wf = new WorkflowPage(); -const TEST_TAGS = ['Tag 1', 'Tag 2', 'Tag 3']; +const TEST_TAGS = ['Tag 1', 'Tag 2', 'Tag 3', 'Tag 4', 'Tag 5']; describe('Workflow tags', () => { - beforeEach(() => { - cy.resetAll(); + before(() => { cy.skipSetup(); }); + beforeEach(() => { + wf.actions.visit(); + }); + it('should create and attach tags inline', () => { wf.getters.createTagButton().click(); - wf.actions.addTags(TEST_TAGS); - wf.getters.tagPills().should('have.length', TEST_TAGS.length); + wf.actions.addTags(TEST_TAGS.slice(0, 2)); + wf.getters.tagPills().should('have.length', 2); wf.getters.nthTagPill(1).click(); - wf.actions.addTags('Tag 4'); - wf.getters.tagPills().should('have.length', TEST_TAGS.length + 1); + wf.actions.addTags(TEST_TAGS[2]); + wf.getters.tagPills().should('have.length', 3); wf.getters.isWorkflowSaved(); }); it('should create tags via modal', () => { wf.actions.openTagManagerModal(); - const [first, second] = TEST_TAGS; - - cy.contains('Create a tag').click(); - cy.getByTestId('tags-table').find('input').type(first).type('{enter}'); - cy.contains('Add new').click(); - cy.wait(300); - cy.getByTestId('tags-table').find('input').type(second).type('{enter}'); + const tags = TEST_TAGS.slice(3); + for (const tag of tags) { + cy.contains('Add new').click(); + cy.getByTestId('tags-table').find('input').type(tag).type('{enter}'); + cy.wait(300); + } cy.contains('Done').click(); wf.getters.createTagButton().click(); - wf.getters.tagsInDropdown().should('have.length', 2); // two stored + wf.getters.tagsInDropdown().should('have.length', 5); wf.getters.tagPills().should('have.length', 0); // none attached }); - it('should delete a tag via modal', () => { + it('should delete all tags via modal', () => { wf.actions.openTagManagerModal(); - const [first] = TEST_TAGS; + TEST_TAGS.forEach(() => { + cy.getByTestId('delete-tag-button').first().click({ force: true }); + cy.contains('Delete tag').click(); + cy.wait(300); + }); - cy.contains('Create a tag').click(); - cy.getByTestId('tags-table').find('input').type(first).type('{enter}'); - cy.getByTestId('delete-tag-button').click({ force: true }); - cy.wait(300); - cy.contains('Delete tag').click(); cy.contains('Done').click(); wf.getters.createTagButton().click(); wf.getters.tagsInDropdown().should('have.length', 0); // none stored diff --git a/cypress/e2e/18-user-management.cy.ts b/cypress/e2e/18-user-management.cy.ts index f06ba3d655..9f51f561d9 100644 --- a/cypress/e2e/18-user-management.cy.ts +++ b/cypress/e2e/18-user-management.cy.ts @@ -51,7 +51,6 @@ const personalSettingsPage = new PersonalSettingsPage(); describe('User Management', () => { before(() => { - cy.resetAll(); cy.setupOwner(instanceOwner); }); diff --git a/cypress/e2e/19-execution.cy.ts b/cypress/e2e/19-execution.cy.ts index 6ad2ce6592..983e5e4bba 100644 --- a/cypress/e2e/19-execution.cy.ts +++ b/cypress/e2e/19-execution.cy.ts @@ -6,11 +6,14 @@ const workflowPage = new WorkflowPageClass(); const ndv = new NDV(); describe('Execution', () => { - beforeEach(() => { - cy.resetAll(); + before(() => { cy.skipSetup(); }); + beforeEach(() => { + workflowPage.actions.visit(); + }); + it('should test manual workflow', () => { cy.createFixtureWorkflow('Manual_wait_set.json', `Manual wait set ${uuid()}`); @@ -264,7 +267,6 @@ describe('Execution', () => { .canvasNodeByName('Set') .within(() => cy.get('.fa-check').should('not.exist')); - // Check canvas nodes after workflow stopped workflowPage.getters .canvasNodeByName('Webhook') diff --git a/cypress/e2e/2-credentials.cy.ts b/cypress/e2e/2-credentials.cy.ts index 17d51ebb0d..d8f3fc5e0e 100644 --- a/cypress/e2e/2-credentials.cy.ts +++ b/cypress/e2e/2-credentials.cy.ts @@ -33,7 +33,6 @@ const NEW_CREDENTIAL_NAME = 'Something else'; describe('Credentials', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/20-workflow-executions.cy.ts b/cypress/e2e/20-workflow-executions.cy.ts index 1e40b7dcc4..fe40633c38 100644 --- a/cypress/e2e/20-workflow-executions.cy.ts +++ b/cypress/e2e/20-workflow-executions.cy.ts @@ -7,7 +7,6 @@ const executionsTab = new WorkflowExecutionsTab(); // Test suite for executions tab describe('Current Workflow Executions', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/21-community-nodes.cy.ts b/cypress/e2e/21-community-nodes.cy.ts index f46a829ac0..d48d365c4f 100644 --- a/cypress/e2e/21-community-nodes.cy.ts +++ b/cypress/e2e/21-community-nodes.cy.ts @@ -14,7 +14,6 @@ const workflowPage = new WorkflowPage(); // We want to keep the other tests as fast as possible so we don't want to break the cache in those. describe('Community Nodes', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }) beforeEach(() => { diff --git a/cypress/e2e/22-user-activation-modal.cy.ts b/cypress/e2e/22-user-activation-modal.cy.ts index eb598abff6..e9a730623d 100644 --- a/cypress/e2e/22-user-activation-modal.cy.ts +++ b/cypress/e2e/22-user-activation-modal.cy.ts @@ -9,11 +9,11 @@ const userActivationSurveyModal = new UserActivationSurveyModal(); const BASE_WEBHOOK_URL = 'http://localhost:5678/webhook'; describe('User activation survey', () => { - it('Should show activation survey', () => { - cy.resetAll(); - + before(() => { cy.skipSetup(); + }); + it('Should show activation survey', () => { cy.intercept('GET', '/rest/settings', (req) => { req.reply(SettingsWithActivationModalEnabled); }); diff --git a/cypress/e2e/23-variables.cy.ts b/cypress/e2e/23-variables.cy.ts index ce78f8fbe3..90ccfedae2 100644 --- a/cypress/e2e/23-variables.cy.ts +++ b/cypress/e2e/23-variables.cy.ts @@ -11,7 +11,6 @@ const lastName = randLastName(); describe('Variables', () => { before(() => { - cy.resetAll(); cy.setup({ email, firstName, lastName, password }); }); diff --git a/cypress/e2e/24-ndv-paired-item.cy.ts b/cypress/e2e/24-ndv-paired-item.cy.ts index 05f5dd8581..b7f6c0f437 100644 --- a/cypress/e2e/24-ndv-paired-item.cy.ts +++ b/cypress/e2e/24-ndv-paired-item.cy.ts @@ -6,10 +6,9 @@ const ndv = new NDV(); describe('NDV', () => { before(() => { - cy.resetAll(); cy.skipSetup(); - }); + beforeEach(() => { workflowPage.actions.visit(); workflowPage.actions.renameWorkflow(uuid()); diff --git a/cypress/e2e/25-stickies.cy.ts b/cypress/e2e/25-stickies.cy.ts index 0746fddc03..13396efe25 100644 --- a/cypress/e2e/25-stickies.cy.ts +++ b/cypress/e2e/25-stickies.cy.ts @@ -15,9 +15,11 @@ function checkStickiesStyle( top: number, left: number, height: number, width: n } describe('Canvas Actions', () => { - beforeEach(() => { - cy.resetAll(); + before(() => { cy.skipSetup(); + }); + + beforeEach(() => { workflowPage.actions.visit(); cy.window().then( diff --git a/cypress/e2e/26-resource-locator.cy.ts b/cypress/e2e/26-resource-locator.cy.ts index e0ba34d70a..3a00dded78 100644 --- a/cypress/e2e/26-resource-locator.cy.ts +++ b/cypress/e2e/26-resource-locator.cy.ts @@ -9,7 +9,6 @@ const INVALID_CREDENTIALS_MESSAGE = 'Please check your credential'; describe('Resource Locator', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/3-default-owner.cy.ts b/cypress/e2e/3-default-owner.cy.ts index 6aba65180c..bd9b29f036 100644 --- a/cypress/e2e/3-default-owner.cy.ts +++ b/cypress/e2e/3-default-owner.cy.ts @@ -35,7 +35,6 @@ const lastName = randLastName(); describe('Default owner', () => { it('should be able to create workflows', () => { - cy.resetAll(); cy.skipSetup(); cy.createFixtureWorkflow('Test_workflow_1.json', `Test workflow`); diff --git a/cypress/e2e/4-node-creator.cy.ts b/cypress/e2e/4-node-creator.cy.ts index 0ad0306cb6..187345e940 100644 --- a/cypress/e2e/4-node-creator.cy.ts +++ b/cypress/e2e/4-node-creator.cy.ts @@ -6,10 +6,8 @@ const nodeCreatorFeature = new NodeCreator(); const WorkflowPage = new WorkflowPageClass(); const NDVModal = new NDV(); - describe('Node Creator', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/5-ndv.cy.ts b/cypress/e2e/5-ndv.cy.ts index 8c8809ad26..a375330cf7 100644 --- a/cypress/e2e/5-ndv.cy.ts +++ b/cypress/e2e/5-ndv.cy.ts @@ -6,10 +6,9 @@ const ndv = new NDV(); describe('NDV', () => { before(() => { - cy.resetAll(); cy.skipSetup(); - }); + beforeEach(() => { workflowPage.actions.visit(); workflowPage.actions.renameWorkflow(uuid()); diff --git a/cypress/e2e/6-code-node.cy.ts b/cypress/e2e/6-code-node.cy.ts index 7fa465d2ee..9a12dfccf4 100644 --- a/cypress/e2e/6-code-node.cy.ts +++ b/cypress/e2e/6-code-node.cy.ts @@ -6,7 +6,6 @@ const ndv = new NDV(); describe('Code node', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/7-workflow-actions.cy.ts b/cypress/e2e/7-workflow-actions.cy.ts index baa38e9f7a..b7f948744c 100644 --- a/cypress/e2e/7-workflow-actions.cy.ts +++ b/cypress/e2e/7-workflow-actions.cy.ts @@ -15,7 +15,6 @@ const WorkflowPage = new WorkflowPageClass(); describe('Workflow Actions', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); @@ -111,8 +110,6 @@ describe('Workflow Actions', () => { }); it('should update workflow settings', () => { - cy.resetAll(); - cy.skipSetup(); WorkflowPage.actions.visit(); // Open settings dialog WorkflowPage.actions.saveWorkflowOnButtonClick(); @@ -121,7 +118,7 @@ describe('Workflow Actions', () => { WorkflowPage.getters.workflowMenuItemSettings().should('be.visible'); WorkflowPage.getters.workflowMenuItemSettings().click(); // Change all settings - WorkflowPage.getters.workflowSettingsErrorWorkflowSelect().find('li').should('have.length', 2); + WorkflowPage.getters.workflowSettingsErrorWorkflowSelect().find('li').should('have.length', 7); WorkflowPage.getters .workflowSettingsErrorWorkflowSelect() .find('li') @@ -229,6 +226,7 @@ describe('Workflow Actions', () => { it('should duplicate unsaved workflow', () => { duplicateWorkflow(); }); + it('should duplicate saved workflow', () => { WorkflowPage.actions.saveWorkflowOnButtonClick(); duplicateWorkflow(); diff --git a/cypress/e2e/8-http-request-node.cy.ts b/cypress/e2e/8-http-request-node.cy.ts index 9c3cce11e8..a40d37cf23 100644 --- a/cypress/e2e/8-http-request-node.cy.ts +++ b/cypress/e2e/8-http-request-node.cy.ts @@ -5,7 +5,6 @@ const ndv = new NDV(); describe('HTTP Request node', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/e2e/9-expression-editor-modal.cy.ts b/cypress/e2e/9-expression-editor-modal.cy.ts index dd4e01128b..6b0412cc21 100644 --- a/cypress/e2e/9-expression-editor-modal.cy.ts +++ b/cypress/e2e/9-expression-editor-modal.cy.ts @@ -4,7 +4,6 @@ const WorkflowPage = new WorkflowPageClass(); describe('Expression editor modal', () => { before(() => { - cy.resetAll(); cy.skipSetup(); }); diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index ee534b4dc5..1df0199296 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -15,6 +15,10 @@ import './commands'; +before(() => { + cy.resetAll(); +}); + // Load custom nodes and credentials fixtures beforeEach(() => { cy.intercept('GET', '/rest/settings').as('loadSettings'); @@ -25,6 +29,6 @@ beforeEach(() => { statusCode: 200, body: { data: { status: 'success', message: 'Tested successfully' }, - } + }, }); -}) +});