summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-06-01 07:33:39 +0000
committerPhil Hughes <me@iamphill.com>2018-06-01 07:33:39 +0000
commit1364dd12cce13769ab42cf664eca2f42d886aaec (patch)
treefc58b65255ee74f7f2f3fb33e80ce00de10f1ea3 /spec/support
parent50fda506e3bc93af47c8ebcbfc7d38c7ae55467d (diff)
parent6d2fedf74fcce537c8650e15867c80fee297ae43 (diff)
downloadgitlab-ce-1364dd12cce13769ab42cf664eca2f42d886aaec.tar.gz
Merge branch '47046-use-sortable-from-npm' into 'master'
Use NPM provided version of SortableJS Closes #47046 See merge request gitlab-org/gitlab-ce!19274
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/drag_to_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/helpers/drag_to_helper.rb b/spec/support/helpers/drag_to_helper.rb
index ae149631ed9..6d53ad0b602 100644
--- a/spec/support/helpers/drag_to_helper.rb
+++ b/spec/support/helpers/drag_to_helper.rb
@@ -1,6 +1,6 @@
module DragTo
- def drag_to(list_from_index: 0, from_index: 0, to_index: 0, list_to_index: 0, selector: '', scrollable: 'body')
- evaluate_script("simulateDrag({scrollable: $('#{scrollable}').get(0), from: {el: $('#{selector}').eq(#{list_from_index}).get(0), index: #{from_index}}, to: {el: $('#{selector}').eq(#{list_to_index}).get(0), index: #{to_index}}});")
+ def drag_to(list_from_index: 0, from_index: 0, to_index: 0, list_to_index: 0, selector: '', scrollable: 'body', duration: 1000)
+ evaluate_script("simulateDrag({scrollable: $('#{scrollable}').get(0), duration: #{duration}, from: {el: $('#{selector}').eq(#{list_from_index}).get(0), index: #{from_index}}, to: {el: $('#{selector}').eq(#{list_to_index}).get(0), index: #{to_index}}});")
Timeout.timeout(Capybara.default_max_wait_time) do
loop while drag_active?