test(controls): add tests

This commit is contained in:
moklick
2020-07-21 11:13:42 +02:00
parent 5e12dd7eff
commit 8e7fcced9b
3 changed files with 84 additions and 28 deletions
+2 -8
View File
@@ -115,16 +115,10 @@ describe('Basic Flow Rendering', () => {
});
it('drags the pane', () => {
// for d3 we have to pass the window to the event
// https://github.com/cypress-io/cypress/issues/3441
const newPosition = {
clientX: Cypress.config('viewportWidth') * 0.6,
clientY: Cypress.config('viewportHeight') * 0.7,
};
const styleBeforeDrag = Cypress.$('.react-flow__nodes').css('transform');
// 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')
.trigger('mousedown', 'topLeft', { which: 1, view: win })