diff --git a/cypress/integration/flow/basic.spec.js b/cypress/integration/flow/basic.spec.js index 7e2519a8..76662617 100644 --- a/cypress/integration/flow/basic.spec.js +++ b/cypress/integration/flow/basic.spec.js @@ -56,7 +56,9 @@ describe('Basic Flow Rendering', () => { .wait(50) .trigger('mouseup', 1, 200, { force: true }); - cy.get('.react-flow__node').eq(3).should('have.class', 'selected'); + cy.wait(100); + + cy.get('.react-flow__node').eq(1).should('have.class', 'selected'); cy.get('.react-flow__node').eq(0).should('have.not.class', 'selected'); @@ -120,7 +122,7 @@ describe('Basic Flow Rendering', () => { .wait(50) .trigger('mouseup', { force: true }); - cy.get('.react-flow__edge').should('have.length', 2); + cy.get('.react-flow__edge').should('have.length', 3); }); // @TODO: why does this fail since react18? diff --git a/cypress/integration/flow/minimap.spec.js b/cypress/integration/flow/minimap.spec.js index 06b91817..c2f67800 100644 --- a/cypress/integration/flow/minimap.spec.js +++ b/cypress/integration/flow/minimap.spec.js @@ -37,14 +37,15 @@ describe('Minimap Testing', () => { const xPosBeforeDrag = Cypress.$('.react-flow__minimap-node:first').attr('x'); const yPosBeforeDrag = Cypress.$('.react-flow__minimap-node:first').attr('y'); - cy.drag('.react-flow__node:first', { x: 500, y: 25 }).then(($el) => { - cy.wait(1000); - const xPosAfterDrag = Cypress.$('.react-flow__minimap-node:first').attr('x'); - const yPosAfterDrag = Cypress.$('.react-flow__minimap-node:first').attr('y'); + cy.drag('.react-flow__node:first', { x: 500, y: 25 }) + .wait(100) + .then(() => { + const xPosAfterDrag = Cypress.$('.react-flow__minimap-node:first').attr('x'); + const yPosAfterDrag = Cypress.$('.react-flow__minimap-node:first').attr('y'); - expect(xPosBeforeDrag).to.not.equal(xPosAfterDrag); - expect(yPosBeforeDrag).to.not.equal(yPosAfterDrag); - }); + expect(xPosBeforeDrag).to.not.equal(xPosAfterDrag); + expect(yPosBeforeDrag).to.not.equal(yPosAfterDrag); + }); }); it('changes node positions via pane drag', () => { diff --git a/example/src/Overview/index.tsx b/example/src/Overview/index.tsx index b31966d1..ce8e774d 100644 --- a/example/src/Overview/index.tsx +++ b/example/src/Overview/index.tsx @@ -50,7 +50,6 @@ const initialNodes: Node[] = [ { id: '1', type: 'input', - draggable: false, data: { label: ( <>