Comments (13)
Both move and drag are doing nothing for me. Elements are just staying put.
from cypress-drag-drop.
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.
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.
@NPC yes Im getting the exact same thing
from cypress-drag-drop.
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.
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.
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.
duplicate of #36
from cypress-drag-drop.
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.
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.
don't know if this solves anything for anyone but it should be move({ x: 100, y: 100, force: true})
from cypress-drag-drop.
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.
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)
- Clicking the Correct Location but not Draging From Clicked Location
- cypress drag not working with version 2.2.1 HOT 1
- Drag drop 2.2.1 not working with Cypress 10.7.0 HOT 1
- Drag and Drop issue in Iframe
- Drop stopped working after the second drag and drop HOT 3
- Cypress 11 support HOT 10
- Type error when trying to chain drag(...).then(...) HOT 1
- Cypress 12.0.2 not supported HOT 3
- Cypress detected that you returned a promise from a command while also invoking one or more cy commands in that promise.
- Allow specifying a relative position parameter when dragging the source element.
- Support for iFrame
- Publish into github packages
- Can not install with Cypress8.2.0 HOT 1
- Drag and drop is not working HOT 6
- Cypress Typescript error ts(2769) HOT 2
- conflicting dependencies cypress-drag-drop v2.2.4 with cypress v13.0.0 HOT 2
- cypress 13 support HOT 1
- Dragend event is missing HOT 1
- The drag action doesnt work without move the mouse and there is no .then() for drag HOT 1
- Drag and drop doesn't work with pointerup trigger for drop
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-drag-drop.