From 4bc063bbe376226ede32945928af62a6b77f1e5c Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Fri, 23 Aug 2019 10:44:40 +0200 Subject: Remove jQuery from DragTo helper --- spec/support/helpers/drag_to_helper.rb | 6 +++--- 1 file 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} -- cgit v1.2.1