Remove unnecessary execute_script call in feature spec
This call to `execute_script` would directly call jQuery's `sortable` function on an element to make it sortable. However, this isn't necessary; the test can still drag the "Cat People" aspect to the desired position without it.
This commit is contained in:
parent
245bc1a05f
commit
688245c0de
1 changed files with 0 additions and 2 deletions
|
|
@ -119,8 +119,6 @@ When /^(.*) in the aspect creation modal$/ do |action|
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I drag "([^"]*)" (up|down)$/ do |aspect_name, direction|
|
When /^I drag "([^"]*)" (up|down)$/ do |aspect_name, direction|
|
||||||
expect(page).to have_js_defined("$('body').sortable")
|
|
||||||
page.execute_script("$('#aspect_nav .list-group').sortable('option', 'tolerance', 'pointer');")
|
|
||||||
aspect_id = @me.aspects.where(name: aspect_name).first.id
|
aspect_id = @me.aspects.where(name: aspect_name).first.id
|
||||||
aspect = find(:xpath, "//div[@id='aspect_nav']/ul/a[@data-aspect-id='#{aspect_id}']")
|
aspect = find(:xpath, "//div[@id='aspect_nav']/ul/a[@data-aspect-id='#{aspect_id}']")
|
||||||
target = direction == "up" ? aspect.all(:xpath, "./preceding-sibling::a").last :
|
target = direction == "up" ? aspect.all(:xpath, "./preceding-sibling::a").last :
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue