summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/support/helpers/drag_to_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/helpers/drag_to_helper.rb b/spec/support/helpers/drag_to_helper.rb
index 19c7c4dcde1..2e9932f2e8a 100644
--- a/spec/support/helpers/drag_to_helper.rb
+++ b/spec/support/helpers/drag_to_helper.rb
@@ -4,14 +4,14 @@ module DragTo
def drag_to(list_from_index: 0, from_index: 0, to_index: 0, list_to_index: 0, selector: '', scrollable: 'body', duration: 1000, perform_drop: true)
js = <<~JS
simulateDrag({
- scrollable: $('#{scrollable}').get(0),
+ scrollable: document.querySelector('#{scrollable}'),
duration: #{duration},
from: {
- el: $('#{selector}').eq(#{list_from_index}).get(0),
+ el: document.querySelectorAll('#{selector}')[#{list_from_index}],
index: #{from_index}
},
to: {
- el: $('#{selector}').eq(#{list_to_index}).get(0),
+ el: document.querySelectorAll('#{selector}')[#{list_to_index}],
index: #{to_index}
},
performDrop: #{perform_drop}