Support steps option for dragging#182
Conversation
|
@route would you be able to review? |
|
Yea sorry busy week at work, going to to do it |
|
@route hi, just wanted to check in on this and see if there was anything I could help with getting this merged. Been running with this patch on my project for a few weeks now without any problems. |
|
@swanson Can you share an example of usage too? I have tried your patch without any luck. |
test "Can drag and drop content blocks from toolbar onto page" do
visit "/pages/new"
text_block = find("#toolbar div", text: "Text Block")
sidebar = find("#sidebar)
text_block.drag_to(sidebar, steps: 10)
page.driver.wait_for_network_idle
within "#sidebar" do
assert_text "Enter text content"
end
endI am using this in combination with the Sortable.js library and I set the option for Without the |
Huge thanks to the user reporting and providing a fix for this specific issue in rubycdp/cuprite#182!
Huge thanks to the user reporting and providing a fix for this specific issue in rubycdp/cuprite#182!
I've been trying to get a system test working with https://sortablejs.github.io/Sortable/
I had to do two things:
forceFallbackconfig totrue: this is an application level change to not use HTML native drag and drop and use a different event fallbackstepsto themouse.movecallsThis PR adds an option to pass
stepsto use when dragging in case you need to more closely simulate dragging the mouse across the browser (vs the current "teleport" behavior)