mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
fix: fix varous e2e suites
This commit is contained in:
parent
ea2e5371dc
commit
ee53c81eff
|
@ -131,11 +131,11 @@ describe('Undo/Redo', () => {
|
|||
.should('have.attr', 'style', 'left: 740px; top: 320px;');
|
||||
});
|
||||
|
||||
it.skip('should undo/redo deleting a connection by pressing delete button', () => {
|
||||
it('should undo/redo deleting a connection by pressing delete button', () => {
|
||||
WorkflowPage.actions.addNodeToCanvas(SCHEDULE_TRIGGER_NODE_NAME);
|
||||
WorkflowPage.actions.addNodeToCanvas(CODE_NODE_NAME);
|
||||
WorkflowPage.getters.nodeConnections().realHover();
|
||||
cy.get('.connection-actions .delete').filter(':visible').should('be.visible').click();
|
||||
cy.get('.connection-actions .delete').filter(':visible').should('be.visible').realClick();
|
||||
WorkflowPage.getters.nodeConnections().should('have.length', 0);
|
||||
WorkflowPage.actions.hitUndo();
|
||||
WorkflowPage.getters.nodeConnections().should('have.length', 1);
|
||||
|
@ -252,7 +252,7 @@ describe('Undo/Redo', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it.skip('should undo/redo multiple steps', () => {
|
||||
it('should undo/redo multiple steps', () => {
|
||||
WorkflowPage.actions.addNodeToCanvas(SCHEDULE_TRIGGER_NODE_NAME);
|
||||
WorkflowPage.actions.addNodeToCanvas(CODE_NODE_NAME);
|
||||
WorkflowPage.actions.addNodeToCanvas(SET_NODE_NAME);
|
||||
|
@ -291,7 +291,7 @@ describe('Undo/Redo', () => {
|
|||
WorkflowPage.getters
|
||||
.canvasNodes()
|
||||
.first()
|
||||
.should('have.attr', 'style', 'left: 540px; top: 360px;');
|
||||
.should('have.attr', 'style', 'left: 440px; top: 360px;');
|
||||
// Third redo: Should delete the Set node
|
||||
WorkflowPage.actions.hitRedo();
|
||||
WorkflowPage.getters.canvasNodes().should('have.length', 3);
|
||||
|
|
|
@ -66,7 +66,6 @@ describe('Canvas Actions', () => {
|
|||
WorkflowPage.getters.nodeViewBackground().click({ force: true });
|
||||
});
|
||||
|
||||
|
||||
it('should add a connected node using plus endpoint', () => {
|
||||
WorkflowPage.actions.addNodeToCanvas(MANUAL_TRIGGER_NODE_NAME);
|
||||
cy.get('.plus-endpoint').should('be.visible').click();
|
||||
|
@ -83,14 +82,10 @@ describe('Canvas Actions', () => {
|
|||
cy.get('.plus-endpoint').should('be.visible').click();
|
||||
WorkflowPage.getters.nodeCreatorSearchBar().should('be.visible');
|
||||
WorkflowPage.getters.nodeCreatorSearchBar().type(CODE_NODE_NAME);
|
||||
cy.drag(
|
||||
WorkflowPage.getters.nodeCreatorNodeItems().first(),
|
||||
[100, 100],
|
||||
{
|
||||
realMouse: true,
|
||||
abs: true
|
||||
}
|
||||
);
|
||||
cy.drag(WorkflowPage.getters.nodeCreatorNodeItems().first(), [100, 100], {
|
||||
realMouse: true,
|
||||
abs: true,
|
||||
});
|
||||
cy.get('body').type('{esc}');
|
||||
WorkflowPage.getters.canvasNodes().should('have.length', 2);
|
||||
WorkflowPage.getters.nodeConnections().should('have.length', 1);
|
||||
|
@ -101,14 +96,10 @@ describe('Canvas Actions', () => {
|
|||
cy.get('.plus-endpoint').should('be.visible').click();
|
||||
WorkflowPage.getters.nodeCreatorSearchBar().should('be.visible');
|
||||
WorkflowPage.getters.nodeCreatorSearchBar().type(CODE_NODE_NAME);
|
||||
cy.drag(
|
||||
WorkflowPage.getters.nodeCreatorActionItems().first(),
|
||||
[100, 100],
|
||||
{
|
||||
realMouse: true,
|
||||
abs: true
|
||||
}
|
||||
);
|
||||
cy.drag(WorkflowPage.getters.nodeCreatorActionItems().first(), [100, 100], {
|
||||
realMouse: true,
|
||||
abs: true,
|
||||
});
|
||||
WorkflowPage.getters.nodeCreatorCategoryItems().its('length').should('be.gt', 0);
|
||||
WorkflowPage.getters.canvasNodes().should('have.length', 1);
|
||||
WorkflowPage.getters.nodeConnections().should('have.length', 0);
|
||||
|
|
|
@ -90,7 +90,7 @@ describe('Canvas Node Manipulation and Navigation', () => {
|
|||
cy.get('[data-label="2 items"]').should('be.visible');
|
||||
});
|
||||
|
||||
it.only('should add nodes and check execution success', () => {
|
||||
it('should add nodes and check execution success', () => {
|
||||
WorkflowPage.actions.addNodeToCanvas(MANUAL_TRIGGER_NODE_NAME);
|
||||
WorkflowPage.getters.canvasNodeByName(MANUAL_TRIGGER_NODE_DISPLAY_NAME).click();
|
||||
for (let i = 0; i < 3; i++) {
|
||||
|
@ -107,7 +107,7 @@ describe('Canvas Node Manipulation and Navigation', () => {
|
|||
WorkflowPage.actions.zoomToFit();
|
||||
|
||||
cy.get('.plus-draggable-endpoint').filter(':visible').should('not.have.class', 'ep-success');
|
||||
cy.get('.jtk-connector.success').should('have.length', 4);
|
||||
cy.get('.jtk-connector.success').should('have.length', 3);
|
||||
cy.get('.jtk-connector').should('have.length', 4);
|
||||
});
|
||||
|
||||
|
|
|
@ -7,12 +7,10 @@ describe('Data transformation expressions', () => {
|
|||
beforeEach(() => {
|
||||
wf.actions.visit();
|
||||
|
||||
cy.window().then(
|
||||
(win) => {
|
||||
// @ts-ignore
|
||||
win.preventNodeViewBeforeUnload = true;
|
||||
},
|
||||
);
|
||||
cy.window().then((win) => {
|
||||
// @ts-ignore
|
||||
win.preventNodeViewBeforeUnload = true;
|
||||
});
|
||||
});
|
||||
|
||||
it('$json + native string methods', () => {
|
||||
|
@ -85,7 +83,7 @@ describe('Data transformation expressions', () => {
|
|||
|
||||
ndv.getters.inlineExpressionEditorInput().clear().type(input);
|
||||
ndv.actions.execute();
|
||||
ndv.getters.outputDataContainer().find('[class*=value_]').should('exist')
|
||||
ndv.getters.outputDataContainer().find('[class*=value_]').should('exist');
|
||||
ndv.getters.outputDataContainer().find('[class*=value_]').should('contain', output);
|
||||
});
|
||||
|
||||
|
@ -100,7 +98,7 @@ describe('Data transformation expressions', () => {
|
|||
|
||||
ndv.getters.inlineExpressionEditorInput().clear().type(input);
|
||||
ndv.actions.execute();
|
||||
ndv.getters.outputDataContainer().find('[class*=value_]').should('exist')
|
||||
ndv.getters.outputDataContainer().find('[class*=value_]').should('exist');
|
||||
ndv.getters.outputDataContainer().find('[class*=value_]').should('contain', output);
|
||||
});
|
||||
});
|
||||
|
@ -111,7 +109,7 @@ describe('Data transformation expressions', () => {
|
|||
|
||||
const addSet = () => {
|
||||
wf.actions.addNodeToCanvas('Set', true, true);
|
||||
ndv.getters.parameterInput('keepOnlySet').find('div[role=switch]').click(); // shorten output
|
||||
ndv.getters.parameterInput('keepOnlySet').find('.el-switch').click(); // shorten output
|
||||
cy.get('input[placeholder="Add Value"]').click();
|
||||
cy.get('span').contains('String').click();
|
||||
ndv.getters.nthParam(3).contains('Expression').invoke('show').click(); // Values to Set > String > Value
|
||||
|
|
|
@ -4,6 +4,7 @@ import {
|
|||
SCHEDULE_TRIGGER_NODE_NAME,
|
||||
} from './../constants';
|
||||
import { WorkflowPage, NDV } from '../pages';
|
||||
import { getVisibleSelect } from '../utils';
|
||||
|
||||
const workflowPage = new WorkflowPage();
|
||||
const ndv = new NDV();
|
||||
|
@ -28,11 +29,7 @@ describe('Data mapping', () => {
|
|||
ndv.getters.inputDataContainer().get('table', { timeout: 10000 }).should('exist');
|
||||
|
||||
ndv.getters.nodeParameters().find('input[placeholder*="Add Value"]').click();
|
||||
ndv.getters
|
||||
.nodeParameters()
|
||||
.find('.el-select-dropdown__list li:nth-child(3)')
|
||||
.should('have.text', 'String')
|
||||
.click();
|
||||
getVisibleSelect().find('li:nth-child(3)').should('have.text', 'String').click();
|
||||
ndv.getters
|
||||
.parameterInput('name')
|
||||
.should('have.length', 1)
|
||||
|
@ -128,7 +125,7 @@ describe('Data mapping', () => {
|
|||
.find('.json-data')
|
||||
.should(
|
||||
'have.text',
|
||||
'[{"input":[{"count":0,"with space":"!!","with.dot":"!!","with"quotes":"!!"}]},{"input":[{"count":1}]}]',
|
||||
'[{"input": [{"count": 0,"with space": "!!","with.dot": "!!","with"quotes": "!!"}]},{"input": [{"count": 1}]}]',
|
||||
)
|
||||
.find('span')
|
||||
.contains('"count"')
|
||||
|
@ -245,7 +242,8 @@ describe('Data mapping', () => {
|
|||
workflowPage.actions.addNodeToCanvas('Item Lists');
|
||||
workflowPage.actions.openNode('Item Lists');
|
||||
|
||||
ndv.getters.parameterInput('operation').click().find('li').contains('Sort').click();
|
||||
ndv.getters.parameterInput('operation').click();
|
||||
getVisibleSelect().find('li').contains('Sort').click();
|
||||
|
||||
ndv.getters.nodeParameters().find('button').contains('Add Field To Sort By').click();
|
||||
|
||||
|
@ -260,7 +258,7 @@ describe('Data mapping', () => {
|
|||
.should('have.value', "input[0]['hello.world']['my count']");
|
||||
});
|
||||
|
||||
it('maps expressions to updated fields correctly', () => {
|
||||
it.only('maps expressions to updated fields correctly', () => {
|
||||
cy.fixture('Test_workflow_3.json').then((data) => {
|
||||
cy.get('body').paste(JSON.stringify(data));
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue