mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
test: Add run linking tests (#6061)
* test: Add link/unlink test * test: Add run linking * test: uncomment other tests * test: change click * test: bring back tests, update click * test: fix flaky paired item test * test: update flaky tests * test: add timeouts * test: update import
This commit is contained in:
parent
59db96771e
commit
feb2ba09b9
|
@ -103,20 +103,33 @@ describe('NDV', () => {
|
|||
|
||||
ndv.actions.switchInputMode('Table');
|
||||
ndv.actions.switchOutputMode('Table');
|
||||
cy.wait(50);
|
||||
|
||||
ndv.getters.backToCanvas().realHover(); // reset to default hover
|
||||
ndv.getters.outputHoveringItem().should('not.exist');
|
||||
ndv.getters.parameterExpressionPreview('value').should('include.text', '1111');
|
||||
|
||||
ndv.actions.selectInputNode('Set1');
|
||||
ndv.getters.inputHoveringItem().should('have.text', '1000').realHover();
|
||||
ndv.getters.backToCanvas().realHover(); // reset to default hover
|
||||
|
||||
ndv.getters.inputTableRow(1)
|
||||
.should('have.text', '1000')
|
||||
.invoke('attr', 'data-test-id')
|
||||
.should('equal', 'hovering-item');
|
||||
ndv.getters.inputTableRow(1).realHover();
|
||||
cy.wait(50);
|
||||
ndv.getters.outputHoveringItem().should('have.text', '1000');
|
||||
ndv.getters.parameterExpressionPreview('value').should('include.text', '1000');
|
||||
|
||||
ndv.actions.selectInputNode('Item Lists');
|
||||
ndv.actions.changeOutputRunSelector('1 of 2 (6 items)');
|
||||
ndv.getters.inputHoveringItem().should('have.text', '1111').realHover();
|
||||
ndv.getters.backToCanvas().realHover(); // reset to default hover
|
||||
|
||||
ndv.getters.inputTableRow(1)
|
||||
.should('have.text', '1111')
|
||||
.invoke('attr', 'data-test-id')
|
||||
.should('equal', 'hovering-item');
|
||||
ndv.getters.inputTableRow(1).realHover();
|
||||
cy.wait(50);
|
||||
ndv.getters.outputHoveringItem().should('have.text', '1111');
|
||||
ndv.getters.parameterExpressionPreview('value').should('include.text', '1111');
|
||||
});
|
||||
|
@ -200,7 +213,11 @@ describe('NDV', () => {
|
|||
ndv.actions.switchOutputMode('Table');
|
||||
|
||||
ndv.getters.backToCanvas().realHover(); // reset to default hover
|
||||
ndv.getters.inputHoveringItem().should('have.text', '1111').realHover();
|
||||
ndv.getters.inputTableRow(1)
|
||||
.should('have.text', '1111')
|
||||
.invoke('attr', 'data-test-id')
|
||||
.should('equal', 'hovering-item');
|
||||
ndv.getters.inputTableRow(1).realHover();
|
||||
ndv.getters.outputHoveringItem().should('not.exist');
|
||||
ndv.getters.parameterExpressionPreview('value').should('include.text', '1111');
|
||||
|
||||
|
|
|
@ -163,5 +163,68 @@ describe('NDV', () => {
|
|||
ndv.getters.outputPanel().find('[class*=_pagination]').should('not.exist');
|
||||
ndv.getters.outputPanel().find('[data-test-id=run-data-schema-item] [data-test-id=run-data-schema-item]').should('have.length', 20);
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
it('can link and unlink run selectors between input and output', () => {
|
||||
cy.createFixtureWorkflow('Test_workflow_5.json', 'Test');
|
||||
workflowPage.actions.zoomToFit();
|
||||
workflowPage.actions.executeWorkflow();
|
||||
workflowPage.actions.openNode('Set3');
|
||||
|
||||
ndv.getters.inputRunSelector()
|
||||
.should('exist')
|
||||
.find('input')
|
||||
.should('include.value', '2 of 2 (6 items)');
|
||||
ndv.getters.outputRunSelector()
|
||||
.should('exist')
|
||||
.find('input')
|
||||
.should('include.value', '2 of 2 (6 items)');
|
||||
|
||||
ndv.actions.switchInputMode('Table');
|
||||
ndv.actions.switchOutputMode('Table');
|
||||
|
||||
ndv.actions.changeOutputRunSelector('1 of 2 (6 items)');
|
||||
ndv.getters.inputRunSelector()
|
||||
.find('input')
|
||||
.should('include.value', '1 of 2 (6 items)');
|
||||
ndv.getters.inputTbodyCell(1, 0).should('have.text', '1111');
|
||||
ndv.getters.outputTbodyCell(1, 0).should('have.text', '1111');
|
||||
|
||||
ndv.getters.inputTbodyCell(1, 0).click(); // remove tooltip
|
||||
ndv.actions.changeInputRunSelector('2 of 2 (6 items)');
|
||||
ndv.getters.outputRunSelector()
|
||||
.find('input')
|
||||
.should('include.value', '2 of 2 (6 items)');
|
||||
|
||||
// unlink
|
||||
ndv.actions.toggleOutputRunLinking();
|
||||
ndv.getters.inputTbodyCell(1, 0).click(); // remove tooltip
|
||||
ndv.actions.changeOutputRunSelector('1 of 2 (6 items)');
|
||||
ndv.getters.inputRunSelector()
|
||||
.should('exist')
|
||||
.find('input')
|
||||
.should('include.value', '2 of 2 (6 items)');
|
||||
|
||||
// link again
|
||||
ndv.actions.toggleOutputRunLinking();
|
||||
ndv.getters.inputTbodyCell(1, 0).click(); // remove tooltip
|
||||
ndv.getters.inputRunSelector()
|
||||
.find('input')
|
||||
.should('include.value', '1 of 2 (6 items)');
|
||||
|
||||
// unlink again
|
||||
ndv.actions.toggleInputRunLinking();
|
||||
ndv.getters.inputTbodyCell(1, 0).click(); // remove tooltip
|
||||
ndv.actions.changeInputRunSelector('2 of 2 (6 items)');
|
||||
ndv.getters.outputRunSelector()
|
||||
.find('input')
|
||||
.should('include.value', '1 of 2 (6 items)');
|
||||
|
||||
// link again
|
||||
ndv.actions.toggleInputRunLinking();
|
||||
ndv.getters.inputTbodyCell(1, 0).click(); // remove tooltip
|
||||
ndv.getters.outputRunSelector()
|
||||
.find('input')
|
||||
.should('include.value', '2 of 2 (6 items)');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue