diff --git a/cypress/e2e/1-workflows.cy.ts b/cypress/e2e/1-workflows.cy.ts deleted file mode 100644 index 8025a306eb..0000000000 --- a/cypress/e2e/1-workflows.cy.ts +++ /dev/null @@ -1,179 +0,0 @@ -import { WorkflowSharingModal } from '../pages'; -import { successToast } from '../pages/notifications'; -import { WorkflowPage as WorkflowPageClass } from '../pages/workflow'; -import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows'; -import { getUniqueWorkflowName } from '../utils/workflowUtils'; - -const WorkflowsPage = new WorkflowsPageClass(); -const WorkflowPage = new WorkflowPageClass(); -const workflowSharingModal = new WorkflowSharingModal(); - -const multipleWorkflowsCount = 5; - -// Migrated to Playwright -// eslint-disable-next-line n8n-local-rules/no-skipped-tests -describe.skip('Workflows', () => { - beforeEach(() => { - cy.visit(WorkflowsPage.url); - }); - - it('should create a new workflow using empty state card', () => { - WorkflowsPage.getters.newWorkflowButtonCard().should('be.visible'); - WorkflowsPage.getters.newWorkflowButtonCard().click(); - - cy.createFixtureWorkflow('Test_workflow_1.json', 'Empty State Card Workflow'); - - WorkflowPage.getters.workflowTags().should('contain.text', 'some-tag-1'); - WorkflowPage.getters.workflowTags().should('contain.text', 'some-tag-2'); - }); - - it('should create multiple new workflows using add workflow button', () => { - [...Array(multipleWorkflowsCount).keys()].forEach(() => { - cy.visit(WorkflowsPage.url); - WorkflowsPage.getters.createWorkflowButton().click(); - - cy.createFixtureWorkflow('Test_workflow_2.json', getUniqueWorkflowName('My New Workflow')); - - WorkflowPage.getters.workflowTags().should('contain.text', 'other-tag-1'); - WorkflowPage.getters.workflowTags().should('contain.text', 'other-tag-2'); - }); - }); - - it('should search for a workflow', () => { - // One Result - WorkflowsPage.getters.searchBar().type('Empty State Card Workflow'); - WorkflowsPage.getters.workflowCards().should('have.length', 1); - WorkflowsPage.getters - .workflowCard('Empty State Card Workflow') - .should('contain.text', 'Empty State Card Workflow'); - - // Multiple Results - WorkflowsPage.getters.searchBar().clear().type('My New Workflow'); - WorkflowsPage.getters.workflowCards().should('have.length', multipleWorkflowsCount); - WorkflowsPage.getters.workflowCard('My New Workflow').should('contain.text', 'My New Workflow'); - - // All Results - WorkflowsPage.getters.searchBar().clear().type('Workflow'); - WorkflowsPage.getters.workflowCards().should('have.length', multipleWorkflowsCount + 1); - WorkflowsPage.getters.workflowCard('Workflow').should('contain.text', 'Workflow'); - - // No Results - WorkflowsPage.getters.searchBar().clear().type('Some non-existent workflow'); - WorkflowsPage.getters.workflowCards().should('not.exist'); - - cy.contains('No workflows found').should('be.visible'); - }); - - it('should archive all the workflows', () => { - WorkflowsPage.getters.workflowCards().should('have.length', multipleWorkflowsCount + 1); - - for (let i = 0; i < multipleWorkflowsCount + 1; i++) { - cy.getByTestId('workflow-card-actions').first().click(); - WorkflowsPage.getters.workflowArchiveButton().click(); - successToast().should('be.visible'); - } - - WorkflowsPage.getters.newWorkflowButtonCard().should('be.visible'); - }); - - it('should respect tag querystring filter when listing workflows', () => { - WorkflowsPage.getters.newWorkflowButtonCard().click(); - - cy.createFixtureWorkflow('Test_workflow_2.json', getUniqueWorkflowName('My New Workflow')); - - cy.visit(WorkflowsPage.url); - - WorkflowsPage.getters.createWorkflowButton().click(); - - cy.createFixtureWorkflow('Test_workflow_1.json', 'Empty State Card Workflow'); - - cy.visit(WorkflowsPage.url); - - WorkflowsPage.getters.workflowFilterButton().click(); - - WorkflowsPage.getters.workflowTagsDropdown().click(); - - WorkflowsPage.getters.workflowTagItem('some-tag-1').click(); - - cy.reload(); - - WorkflowsPage.getters.workflowCards().should('have.length', 1); - }); - - it('should preserve filters in URL', () => { - // Add a search query - WorkflowsPage.getters.searchBar().type('My'); - // Add a tag filter - WorkflowsPage.getters.workflowFilterButton().click(); - WorkflowsPage.getters.workflowTagsDropdown().click(); - WorkflowsPage.getters.workflowTagItem('other-tag-1').click(); - WorkflowsPage.getters.workflowsListContainer().click(); - // Update sort order - WorkflowsPage.getters.workflowSortDropdown().click(); - WorkflowsPage.getters.workflowSortItem('Sort by last created').click({ force: true }); - // Update page size - WorkflowsPage.getters.workflowListPageSizeDropdown().click(); - WorkflowsPage.getters.workflowListPageSizeItem('25').click(); - - // URL should contain all applied filters and pagination - cy.url().should('include', 'search=My'); - // Cannot really know tag id, so just check if it contains 'tags=' - cy.url().should('include', 'tags='); - - // Reload the page - cy.reload(); - // Check if filters and pagination are preserved - WorkflowsPage.getters.searchBar().should('have.value', 'My'); - WorkflowsPage.getters.workflowFilterButton().click(); - WorkflowsPage.getters.workflowTagsDropdown().should('contain.text', 'other-tag-1'); - WorkflowsPage.getters - .workflowSortItem('Sort by last created') - .should('have.attr', 'aria-selected', 'true'); - WorkflowsPage.getters - .workflowListPageSizeItem('25', false) - .should('have.attr', 'aria-selected', 'true'); - // Aso, check if the URL is preserved - cy.url().should('include', 'search=My'); - cy.url().should('include', 'tags='); - }); - - it('should be able to share workflows from workflows list', () => { - WorkflowsPage.getters.workflowCardActions('Empty State Card Workflow').click(); - WorkflowsPage.getters.workflowActionItem('share').click(); - workflowSharingModal.getters.modal().should('be.visible'); - }); - - it('should delete archived workflows', () => { - cy.visit(WorkflowsPage.url); - - // Toggle "Show archived workflows" filter - WorkflowsPage.getters.workflowFilterButton().click(); - WorkflowsPage.getters.workflowArchivedCheckbox().click(); - - WorkflowsPage.getters.workflowCards().should('have.length', multipleWorkflowsCount + 3); - - cy.reload(); - - WorkflowsPage.getters.workflowCards().should('have.length', multipleWorkflowsCount + 3); - - // Archive -> Unarchive -> Archive -> Delete on the first workflow - cy.getByTestId('workflow-card-actions').first().click(); - WorkflowsPage.getters.workflowArchiveButton().click(); - successToast().should('be.visible'); - - cy.getByTestId('workflow-card-actions').first().click(); - WorkflowsPage.getters.workflowUnarchiveButton().click(); - successToast().should('be.visible'); - - cy.getByTestId('workflow-card-actions').first().click(); - WorkflowsPage.getters.workflowArchiveButton().click(); - successToast().should('be.visible'); - - cy.getByTestId('workflow-card-actions').first().click(); - WorkflowsPage.getters.workflowDeleteButton().click(); - cy.get('button').contains('delete').click(); - successToast().should('be.visible'); - - WorkflowsPage.getters.workflowCards().should('have.length', multipleWorkflowsCount + 2); - }); -}); diff --git a/cypress/e2e/15-scheduler-node.cy.ts b/cypress/e2e/15-scheduler-node.cy.ts deleted file mode 100644 index 24f68f4103..0000000000 --- a/cypress/e2e/15-scheduler-node.cy.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { WorkflowPage, NDV } from '../pages'; - -const workflowPage = new WorkflowPage(); -const ndv = new NDV(); - -// Migrated to Playwright -// eslint-disable-next-line n8n-local-rules/no-skipped-tests -describe.skip('Schedule Trigger node', () => { - beforeEach(() => { - workflowPage.actions.visit(); - }); - - it('should execute and return the execution timestamp', () => { - workflowPage.actions.addInitialNodeToCanvas('Schedule Trigger'); - workflowPage.actions.openNode('Schedule Trigger'); - ndv.actions.execute(); - ndv.getters.outputPanel().contains('timestamp'); - ndv.getters.backToCanvas().click(); - }); -}); diff --git a/cypress/e2e/2270-ADO-opening-webhook-ndv-marks-workflow-as-unsaved.cy.ts b/cypress/e2e/2270-ADO-opening-webhook-ndv-marks-workflow-as-unsaved.cy.ts deleted file mode 100644 index 6c0b724b86..0000000000 --- a/cypress/e2e/2270-ADO-opening-webhook-ndv-marks-workflow-as-unsaved.cy.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { WEBHOOK_NODE_NAME } from '../constants'; -import { NDV, WorkflowPage } from '../pages'; - -const workflowPage = new WorkflowPage(); -const ndv = new NDV(); - -// Migrated to Playwright -// eslint-disable-next-line n8n-local-rules/no-skipped-tests -describe.skip('ADO-2270 Save button resets on webhook node open', () => { - it('should not reset the save button if webhook node is opened and closed', () => { - workflowPage.actions.visit(); - workflowPage.actions.addInitialNodeToCanvas(WEBHOOK_NODE_NAME); - workflowPage.getters.saveButton().click(); - workflowPage.actions.openNode(WEBHOOK_NODE_NAME); - - ndv.actions.close(); - - cy.getByTestId('workflow-save-button').should('contain', 'Saved'); - }); -}); diff --git a/cypress/e2e/28-debug.cy.ts b/cypress/e2e/28-debug.cy.ts deleted file mode 100644 index 79d13b6382..0000000000 --- a/cypress/e2e/28-debug.cy.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { - HTTP_REQUEST_NODE_NAME, - IF_NODE_NAME, - MANUAL_TRIGGER_NODE_NAME, - EDIT_FIELDS_SET_NODE_NAME, -} from '../constants'; -import { WorkflowPage, NDV, WorkflowExecutionsTab } from '../pages'; - -const workflowPage = new WorkflowPage(); -const ndv = new NDV(); -const executionsTab = new WorkflowExecutionsTab(); - -// Migrated to Playwright -// eslint-disable-next-line n8n-local-rules/no-skipped-tests -describe.skip('Debug', () => { - beforeEach(() => { - cy.enableFeature('debugInEditor'); - }); - - it('should be able to debug executions', () => { - cy.intercept('GET', '/rest/executions?filter=*').as('getExecutions'); - cy.intercept('GET', '/rest/executions/*').as('getExecution'); - cy.intercept('POST', '/rest/workflows/**/run?**').as('postWorkflowRun'); - - cy.signinAsOwner(); - - workflowPage.actions.visit(); - - workflowPage.actions.addInitialNodeToCanvas(MANUAL_TRIGGER_NODE_NAME); - workflowPage.actions.addNodeToCanvas(HTTP_REQUEST_NODE_NAME); - workflowPage.actions.openNode(HTTP_REQUEST_NODE_NAME); - ndv.actions.typeIntoParameterInput('url', 'https://foo.bar'); - ndv.actions.close(); - - workflowPage.actions.addNodeToCanvas(EDIT_FIELDS_SET_NODE_NAME, true); - - workflowPage.actions.saveWorkflowUsingKeyboardShortcut(); - workflowPage.actions.executeWorkflow(); - - cy.wait(['@postWorkflowRun']); - - executionsTab.actions.switchToExecutionsTab(); - - cy.wait(['@getExecutions']); - - executionsTab.getters.executionDebugButton().should('have.text', 'Debug in editor').click(); - cy.url().should('include', '/debug'); - cy.get('.el-notification').contains('Execution data imported').should('be.visible'); - cy.get('.matching-pinned-nodes-confirmation').should('not.exist'); - - workflowPage.actions.openNode(HTTP_REQUEST_NODE_NAME); - ndv.actions.clearParameterInput('url'); - ndv.actions.typeIntoParameterInput('url', 'https://postman-echo.com/get?foo1=bar1&foo2=bar2'); - ndv.actions.close(); - - workflowPage.actions.saveWorkflowUsingKeyboardShortcut(); - cy.url().should('not.include', '/debug'); - - workflowPage.actions.executeWorkflow(); - - cy.wait(['@postWorkflowRun']); - - workflowPage.actions.openNode(HTTP_REQUEST_NODE_NAME); - ndv.actions.pinData(); - ndv.actions.close(); - - executionsTab.actions.switchToExecutionsTab(); - - cy.wait(['@getExecutions']); - - executionsTab.getters.executionListItems().should('have.length', 2).first().click(); - cy.wait(['@getExecution']); - - executionsTab.getters.executionDebugButton().should('have.text', 'Copy to editor').click(); - - let confirmDialog = cy.get('.matching-pinned-nodes-confirmation').filter(':visible'); - confirmDialog.find('li').should('have.length', 2); - confirmDialog.get('.btn--cancel').click(); - - cy.wait(['@getExecutions']); - - executionsTab.getters.executionListItems().should('have.length', 2).first().click(); - cy.wait(['@getExecution']); - - executionsTab.getters.executionDebugButton().should('have.text', 'Copy to editor').click(); - - confirmDialog = cy.get('.matching-pinned-nodes-confirmation').filter(':visible'); - confirmDialog.find('li').should('have.length', 2); - confirmDialog.get('.btn--confirm').click(); - cy.url().should('include', '/debug'); - - workflowPage.getters - .canvasNodes() - .first() - .should('have.descendants', '[data-test-id="canvas-node-status-pinned"]'); - workflowPage.getters - .canvasNodes() - .not(':first') - .should('not.have.descendants', '[data-test-id="canvas-node-status-pinned"]'); - - cy.reload(true); - cy.wait(['@getExecution']); - - confirmDialog = cy.get('.matching-pinned-nodes-confirmation').filter(':visible'); - confirmDialog.find('li').should('have.length', 1); - confirmDialog.get('.btn--confirm').click(); - - workflowPage.getters.canvasNodePlusEndpointByName(EDIT_FIELDS_SET_NODE_NAME).click(); - workflowPage.actions.addNodeToCanvas(IF_NODE_NAME, false); - workflowPage.actions.saveWorkflowUsingKeyboardShortcut(); - cy.url().should('not.include', '/debug'); - - executionsTab.actions.switchToExecutionsTab(); - cy.wait(['@getExecutions']); - executionsTab.getters.executionDebugButton().should('have.text', 'Copy to editor').click(); - - confirmDialog = cy.get('.matching-pinned-nodes-confirmation').filter(':visible'); - confirmDialog.find('li').should('have.length', 1); - confirmDialog.get('.btn--confirm').click(); - cy.url().should('include', '/debug'); - - workflowPage.getters.canvasNodes().last().find('[class*="statusIcons"]').should('not.exist'); - - workflowPage.getters.canvasNodes().first().dblclick(); - ndv.actions.unPinData(); - - ndv.actions.close(); - - workflowPage.actions.saveWorkflowUsingKeyboardShortcut(); - cy.url().should('not.include', '/debug'); - - workflowPage.actions.executeWorkflow(); - workflowPage.actions.zoomToFit(); - workflowPage.actions.deleteNode(IF_NODE_NAME); - - executionsTab.actions.switchToExecutionsTab(); - cy.wait(['@getExecutions']); - executionsTab.getters.executionListItems().should('have.length', 3).first().click(); - cy.wait(['@getExecution']); - executionsTab.getters.executionDebugButton().should('have.text', 'Copy to editor').click(); - cy.get('.el-notification').contains("Some execution data wasn't imported").should('be.visible'); - cy.url().should('include', '/debug'); - }); -}); diff --git a/cypress/e2e/35-admin-user-smoke-test.cy.ts b/cypress/e2e/35-admin-user-smoke-test.cy.ts deleted file mode 100644 index f267852fc3..0000000000 --- a/cypress/e2e/35-admin-user-smoke-test.cy.ts +++ /dev/null @@ -1,22 +0,0 @@ -const url = '/settings'; - -// Migrated to Playwright -// eslint-disable-next-line n8n-local-rules/no-skipped-tests -describe.skip('Admin user', { disableAutoLogin: true }, () => { - it('should see same Settings sub menu items as instance owner', () => { - cy.signinAsOwner(); - cy.visit(url); - - let ownerMenuItems = 0; - - cy.getByTestId('menu-item').then(($el) => { - ownerMenuItems = $el.length; - }); - - cy.signout(); - cy.signinAsAdmin(); - cy.visit(url); - - cy.getByTestId('menu-item').should('have.length', ownerMenuItems); - }); -}); diff --git a/cypress/e2e/45-ai-assistant.cy.ts b/cypress/e2e/45-ai-assistant.cy.ts index d5d7649b4f..008d224f78 100644 --- a/cypress/e2e/45-ai-assistant.cy.ts +++ b/cypress/e2e/45-ai-assistant.cy.ts @@ -14,18 +14,6 @@ const credentialsPage = new CredentialsPage(); const credentialsModal = new CredentialsModal(); const nodeCreatorFeature = new NodeCreator(); -// Migrated to Playwright -describe.skip('AI Assistant::disabled', () => { - beforeEach(() => { - aiAssistant.actions.disableAssistant(); - wf.actions.visit(); - }); - - it('does not show assistant button if feature is disabled', () => { - aiAssistant.getters.askAssistantFloatingButton().should('not.exist'); - }); -}); - describe('AI Assistant::enabled', () => { beforeEach(() => { aiAssistant.actions.enableAssistant(); diff --git a/cypress/e2e/46-n8n.io-iframe.cy.ts b/cypress/e2e/46-n8n.io-iframe.cy.ts deleted file mode 100644 index 8c31feed12..0000000000 --- a/cypress/e2e/46-n8n.io-iframe.cy.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { WorkflowsPage } from '../pages'; - -const workflowsPage = new WorkflowsPage(); - -// Migrated to Playwright -// eslint-disable-next-line n8n-local-rules/no-skipped-tests -describe.skip('n8n.io iframe', () => { - describe('when telemetry is disabled', () => { - it('should not load the iframe when visiting /home/workflows', () => { - cy.overrideSettings({ telemetry: { enabled: false } }); - - cy.visit(workflowsPage.url); - - cy.get('iframe').should('not.exist'); - }); - }); - - describe('when telemetry is enabled', () => { - it('should load the iframe when visiting /home/workflows', () => { - const testInstanceId = 'test-instance-id'; - - cy.overrideSettings({ telemetry: { enabled: true }, instanceId: testInstanceId }); - - const testUserId = Cypress.env('currentUserId'); - - const iframeUrl = `https://n8n.io/self-install?instanceId=${testInstanceId}&userId=${testUserId}`; - - cy.intercept(iframeUrl, (req) => req.reply(200)).as('iframeRequest'); - - cy.visit(workflowsPage.url); - - cy.get('iframe').should('exist').and('have.attr', 'src', iframeUrl); - - cy.wait('@iframeRequest').its('response.statusCode').should('eq', 200); - }); - }); -}); diff --git a/cypress/e2e/716-AI-bug-correctly-set-up-agent-model-shows-error.cy.ts b/cypress/e2e/716-AI-bug-correctly-set-up-agent-model-shows-error.cy.ts deleted file mode 100644 index bd5bac6736..0000000000 --- a/cypress/e2e/716-AI-bug-correctly-set-up-agent-model-shows-error.cy.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { createNewCredential, getCredentialsPageUrl } from '../composables/credentialsComposables'; -import { - addLanguageModelNodeToParent, - addNodeToCanvas, - getNodeIssuesByName, -} from '../composables/workflow'; -import { AGENT_NODE_NAME, AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME } from '../constants'; - -// Migrated to Playwright -// eslint-disable-next-line n8n-local-rules/no-skipped-tests -describe.skip('AI-716 Correctly set up agent model shows error', () => { - beforeEach(() => { - cy.visit(getCredentialsPageUrl()); - createNewCredential('OpenAi', 'OpenAI Account', 'API Key', 'sk-123', true); - cy.visit('/workflow/new'); - }); - - it('should not show error when adding a sub-node with credential set-up', () => { - addNodeToCanvas('AI Agent'); - addLanguageModelNodeToParent( - AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME, - AGENT_NODE_NAME, - true, - ); - cy.get('body').type('{esc}'); - - getNodeIssuesByName(AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME).should('have.length', 0); - }); -}); diff --git a/cypress/e2e/9999-SUG-38-inline-expression-preview.cy.ts b/cypress/e2e/9999-SUG-38-inline-expression-preview.cy.ts deleted file mode 100644 index a90f4df449..0000000000 --- a/cypress/e2e/9999-SUG-38-inline-expression-preview.cy.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { - assertInlineExpressionValid, - getParameterExpressionPreviewValue, -} from '../composables/ndv'; -import { - clickZoomToFit, - executeWorkflowAndWait, - navigateToNewWorkflowPage, - openNode, - pasteWorkflow, -} from '../composables/workflow'; -import Workflow from '../fixtures/Test_9999-SUG-38.json'; - -// Migrated to Playwright -// eslint-disable-next-line n8n-local-rules/no-skipped-tests -describe.skip('SUG-38 Inline expression previews are not displayed in NDV', () => { - it("should show resolved inline expression preview in NDV if the node's input data is populated", () => { - navigateToNewWorkflowPage(); - pasteWorkflow(Workflow); - clickZoomToFit(); - executeWorkflowAndWait(); - openNode('Repro1'); - assertInlineExpressionValid(); - getParameterExpressionPreviewValue().should('have.text', 'hello there'); - }); -}); diff --git a/cypress/e2e/env-feature-flags.cy.ts b/cypress/e2e/env-feature-flags.cy.ts deleted file mode 100644 index 5b38e99b66..0000000000 --- a/cypress/e2e/env-feature-flags.cy.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Migrated to Playwright -// eslint-disable-next-line n8n-local-rules/no-skipped-tests -describe.skip('Environment Feature Flags', () => { - it('should set feature flags at runtime and load it back in envFeatureFlags from backend settings', () => { - cy.setEnvFeatureFlags({ - N8N_ENV_FEAT_TEST: true, - }); - cy.signinAsOwner(); - cy.intercept('GET', '/rest/settings').as('getSettings'); - cy.visit('/'); - cy.wait('@getSettings').then((interception) => { - expect(interception.response?.body.data.envFeatureFlags).to.be.an('object'); - expect(interception.response?.body.data.envFeatureFlags['N8N_ENV_FEAT_TEST']).to.equal( - 'true', - ); - }); - }); - - it('should reset feature flags at runtime', () => { - cy.setEnvFeatureFlags({ - N8N_ENV_FEAT_TEST: true, - }); - cy.signinAsOwner(); - cy.intercept('GET', '/rest/settings').as('getSettings'); - cy.visit('/'); - cy.wait('@getSettings').then((interception) => { - expect(interception.response?.body.data.envFeatureFlags['N8N_ENV_FEAT_TEST']).to.equal( - 'true', - ); - }); - - cy.clearEnvFeatureFlags(); - cy.visit('/'); - cy.wait('@getSettings').then((interception) => { - expect(interception.response?.body.data.envFeatureFlags).to.be.an('object'); - expect(interception.response?.body.data.envFeatureFlags['N8N_ENV_FEAT_TEST']).to.be.undefined; - }); - }); -});