test(zoom-handling): adjust tests for changes in zoom behaviour

This commit is contained in:
Christopher Möller
2020-10-06 13:45:53 +02:00
parent 0373b53fc2
commit 9e2ecf3db6
5 changed files with 11 additions and 9 deletions
+2 -2
View File
@@ -119,7 +119,7 @@ describe('Basic Flow Rendering', () => {
// for d3 we have to pass the window to the event
// https://github.com/cypress-io/cypress/issues/3441
cy.window().then((win) => {
cy.get('.react-flow__zoompane')
cy.get('.react-flow__renderer')
.trigger('mousedown', 'topLeft', { which: 1, view: win })
.trigger('mousemove', 'bottomLeft')
.trigger('mouseup', { force: true, view: win })
@@ -133,7 +133,7 @@ describe('Basic Flow Rendering', () => {
it('zooms the pane', () => {
const styleBeforeZoom = Cypress.$('.react-flow__nodes').css('transform');
cy.get('.react-flow__zoompane')
cy.get('.react-flow__renderer')
.trigger('wheel', 'topLeft', { deltaY: -200 })
.then(() => {
const styleAfterZoom = Cypress.$('.react-flow__nodes').css('transform');