mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
test: Add more data mapping tests (#5389)
* test: Add more data mapping tests * test: add tests for preview mapping * test: update wording * test: add more tests * test: fix up prev node test * test: stop popup * test: add mapping test for paths * test: revert back param changes * test: fix mapping tests * test: reset db * test: fix up mapping tests * test: fix up mapping tests * test: update tests to be more stable * chore: clean up unused command * fix: fix up before unload bug * fix: fix data transformation tests * test: fix up flaky webhook tests * test: fix up flaky webhook tests * test: fix up flaky dt tests
This commit is contained in:
@@ -243,7 +243,9 @@ Cypress.Commands.add('drag', (selector, pos) => {
|
||||
});
|
||||
|
||||
Cypress.Commands.add('draganddrop', (draggableSelector, droppableSelector) => {
|
||||
cy.get(draggableSelector).should('exist');
|
||||
if (draggableSelector) {
|
||||
cy.get(draggableSelector).should('exist');
|
||||
}
|
||||
cy.get(droppableSelector).should('exist');
|
||||
|
||||
cy.get(droppableSelector)
|
||||
@@ -254,12 +256,16 @@ Cypress.Commands.add('draganddrop', (draggableSelector, droppableSelector) => {
|
||||
const pageX = coords.left + coords.width / 2;
|
||||
const pageY = coords.top + coords.height / 2;
|
||||
|
||||
// We can't use realMouseDown here because it hangs headless run
|
||||
cy.get(draggableSelector).trigger('mousedown');
|
||||
if (draggableSelector) {
|
||||
// We can't use realMouseDown here because it hangs headless run
|
||||
cy.get(draggableSelector).trigger('mousedown');
|
||||
}
|
||||
// We don't chain these commands to make sure cy.get is re-trying correctly
|
||||
cy.get(droppableSelector).realMouseMove(pageX, pageY);
|
||||
cy.get(droppableSelector).realHover();
|
||||
cy.get(droppableSelector).realMouseUp();
|
||||
cy.get(draggableSelector).realMouseUp();
|
||||
if (draggableSelector) {
|
||||
cy.get(draggableSelector).realMouseUp();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user