New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag/drop not working for SortableJS #178
Comments
Sure go ahead and I'll help |
interesting, thanks @swanson for getting my attention to your change. I'd love to see the file where you're successfully pulling this off if you have something you'd be willing to share.. |
Hi @route - I'm just bringing this issue back to life because I've also experienced this same trouble with SortableJS today. My code is open source and my test is here: https://github.com/fishpercolator/name.pn/blob/main/features/signup_and_edit_profile.feature#L242 I tried switching drivers to apparition but in the timebox I had allowed, I couldn't even get apparition to start up - it just hung at me, so I switched by to cuprite and Had you made any progress on this? Is there any way I can help? |
Is there any progress on this issue ?
Direct use of Ferrum methods doesn't work either
Is any workaround to do that ? |
As described in #182 -- you will need to use |
Hi, @swanson ! Thanks for replying . expect(page).to have_selector('#questionnaire_fields')
drag_el = page.find('div.column', text: node_from)
drag_to_el = page.find('div.column', text: node_to)
drag_el.drag_to(drag_to_el, steps: 10) The code from the current gem # cuprite-0.14.3/lib/capybara/cuprite/node.rb
def drag_to(other)
command(:drag, other.node)
end Accordingly, the test execution error
|
It is there on the Maybe a release issue? |
The new release is going to happen soon |
Hi, @swanson ! module Capybara
module Cuprite
class Browser
def drag(node, other, steps)
x_start, y_start = node.find_position
x_end, y_end = other.find_position
mouse.move(x: x_start, y: y_start)
mouse.down
mouse.move(x: x_end, y: y_end, steps:)
mouse.up
end
end
class Node
# :reek:FeatureEnvy
def drag_to(other, **options)
options[:steps] ||= 1
command(:drag, other.node, options[:steps])
end
end
end
end |
Heyo,
I'm using https://github.com/SortableJS/Sortable. I have a simple
drag_to
to move an item. it works when I use https://github.com/twalpole/apparition but if I swap the driver tocuprite
the move of item no longer takes place. I noticedapparition
is doing some interesting stuff in itsdrag_to
method: https://github.com/twalpole/apparition/blob/ca86be4d54af835d531dbcd2b86e7b2c77f85f34/lib/capybara/apparition/node/drag.rb#L5 , using a pile of extra JS stored inHTML5_DRAG_DROP_SCRIPT
.I can create a test case showing the problem, using a piece of html/js that incorporates the SortableJS library. If I can provide that, can you help me debug how to get it working? cheers.
The text was updated successfully, but these errors were encountered: