Giter Site home page Giter Site logo

Comments (13)

lucidity-joe avatar lucidity-joe commented on July 17, 2024 6

Both move and drag are doing nothing for me. Elements are just staying put.

from cypress-drag-drop.

cckrause avatar cckrause commented on July 17, 2024 3

This plugin is kind of useless. Maybe there was a major API change or something but as mentioned before nothing is working as expected. I stepped through some calls and it seems like the internal API is broken.

  drag(sourceWrapper, targetSelector, options) {
    this.init(sourceWrapper, targetSelector, options)
      .then(() => this.dragstart())
      .then(() => this.dragover())
      .then(() => this.drop())
      .then(() => true)
  },

The internal function declarations:

dragstart({ clientX, clientY } = {})
dragover({ clientX, clientY } = {})
drop({ clientX, clientY } = {})

All internal functions dragstart and dragover and drop dragstart got optional parameters { clientX, clientY } = {}. As you can see in the drag call there is no clientX or clientY applied to that functions. After a while digging into the code i can't figure out how this is supposed to work. So i moved on and wrote my own helper...

from cypress-drag-drop.

Uninen avatar Uninen commented on July 17, 2024 3

I'm experiencing the same problem but also can't figure out a way to get dragging working even manually. If anyone has a manual workaround or any examples of working solutions with or without this plugin, I'd appreciate any help 👍

from cypress-drag-drop.

orrybaram avatar orrybaram commented on July 17, 2024 3

@NPC yes Im getting the exact same thing

from cypress-drag-drop.

frederic-lang avatar frederic-lang commented on July 17, 2024 2

duplicate of #36

No.
I set up the package from "github:4teamwork/cypress-drag-drop"
but neither drag and move are not working.
It's not really comprehensive for me, as I can move it straightforward by hand.

Source code for drag :

describe("Separator Test", function(){
    it("should pass", function(){
        cy.visit('http://localhost:8080');
        cy.get('div.separator').as('separator');
        cy.get('@separator').drag('div.right', {force:true})
    })
})

My page is serapated in 3 divs : div.left, div.separator & div.right.
My objective is to take the div.separator and to drag it to the right.
It's really OK when I do it by hand with a mouse, but I can't do it with either commands

from cypress-drag-drop.

frederic-lang avatar frederic-lang commented on July 17, 2024 2

May I share you the source code of the tested components.
I assure you, neither drag and move commands works.

https://codesandbox.io/s/window-splitter-qrlwx

from cypress-drag-drop.

NPC avatar NPC commented on July 17, 2024 2

Are you guys seeing index.js:107 Exceeded maximum tries of: 5, aborting in the console when this happens? .drag worked fine for me before updating to Cypress v8.0.0, but now stopped, even after updating the plugin to v1.8.0.

from cypress-drag-drop.

vlio20 avatar vlio20 commented on July 17, 2024

duplicate of #36

from cypress-drag-drop.

jasurabdullin avatar jasurabdullin commented on July 17, 2024

I have the same issue and I have set up the package from "github:4teamwork/cypress-drag-drop" as well. Is there any update on this?

from cypress-drag-drop.

cedro9 avatar cedro9 commented on July 17, 2024

The code below worked for me. Drag and drop with iframe:

const dataTransfer = new DataTransfer;
cy.get('element-drag')
.trigger('dragstart', { dataTransfer })
cy.iframe('element-iframe')
.trigger('drop', { dataTransfer, force: true });

I also used: https://www.npmjs.com/package/cypress-iframe

from cypress-drag-drop.

sergei-shneider avatar sergei-shneider commented on July 17, 2024

don't know if this solves anything for anyone but it should be move({ x: 100, y: 100, force: true})

from cypress-drag-drop.

mattcph avatar mattcph commented on July 17, 2024

don't know if this solves anything for anyone but it should be move({ x: 100, y: 100, force: true})

Yes, this indeed helped. Needed the force: true part to skip over the 'hidden' error reported. thank you.

from cypress-drag-drop.

IlCallo avatar IlCallo commented on July 17, 2024

All internal functions dragstart and dragover and drop dragstart got optional parameters { clientX, clientY } = {}. As you can see in the drag call there is no clientX or clientY applied to that functions.

@cckrause
clientX and clientY from params are apparently only used when using .move command, that's why nothing is provided when using .drag

from cypress-drag-drop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.