diff --git a/Gemfile b/Gemfile index 4152d2a9f..d2a588e5f 100644 --- a/Gemfile +++ b/Gemfile @@ -270,7 +270,7 @@ group :test do gem "capybara", "2.4.4" gem "database_cleaner" , "1.4.1" - gem "selenium-webdriver", "2.46.2" + gem "selenium-webdriver", "2.47.1" # General helpers diff --git a/Gemfile.lock b/Gemfile.lock index 78644619f..6526c7f5b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -679,7 +679,7 @@ GEM sawyer (0.6.0) addressable (~> 2.3.5) faraday (~> 0.8, < 0.10) - selenium-webdriver (2.46.2) + selenium-webdriver (2.47.1) childprocess (~> 0.5) multi_json (~> 1.0) rubyzip (~> 1.0) @@ -897,7 +897,7 @@ DEPENDENCIES ruby-oembed (= 0.8.14) rubyzip (= 1.1.7) sass-rails (= 5.0.1) - selenium-webdriver (= 2.46.2) + selenium-webdriver (= 2.47.1) shoulda-matchers (= 2.8.0) sidekiq (= 3.4.2) sidetiq (= 0.6.3) diff --git a/features/step_definitions/aspects_steps.rb b/features/step_definitions/aspects_steps.rb index 4bc883209..f9126e628 100644 --- a/features/step_definitions/aspects_steps.rb +++ b/features/step_definitions/aspects_steps.rb @@ -93,9 +93,16 @@ When /^I drag "([^"]*)" (up|down)$/ do |aspect_name, direction| aspect = find(:xpath, "//div[@id='aspect_nav']/ul/a[@data-aspect-id='#{aspect_id}']") target = direction == "up" ? aspect.all(:xpath, "./preceding-sibling::a").last : aspect.all(:xpath, "./following-sibling::a").first - aspect.drag_to(target) + browser = aspect.base.driver.browser + mouse = browser.mouse + native_aspect = aspect.base.native + native_target = target.base.native + mouse.down native_aspect + mouse.move_to native_target, native_target.size.width / 2, 0 + sleep 1 + mouse.up expect(page).to have_no_css "#aspect_nav .ui-sortable.syncing" -end + end And /^I toggle the aspect "([^"]*)"$/ do |name| toggle_aspect(name)