fix timing issues on failing scenarios. Fix deprecated jquery functions and update jqueryui

Signed-off-by: Reinier Balt <lrbalt@gmail.com>
This commit is contained in:
Reinier Balt 2013-02-15 20:51:35 +01:00
parent 98fbbccdcb
commit 1b0d08bbb5
39 changed files with 715 additions and 600 deletions

View file

@ -3,6 +3,8 @@
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
require 'simplecov'
SimpleCov.start 'rails'
require 'cucumber/rails'
@ -55,5 +57,4 @@ end
# Possible values are :truncation and :transaction
# The :transaction strategy is faster, but might give you threading problems.
# See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature
Cucumber::Rails::Database.javascript_strategy = :truncation
Cucumber::Rails::Database.javascript_strategy = :truncation

View file

@ -9,7 +9,7 @@ Capybara.default_wait_time = 5
Capybara.javascript_driver = ENV["JS_DRIVER"] ? ENV["JS_DRIVER"].to_sym : :selenium
if Capybara.javascript_driver == :webkit
require 'capybara/webkit'
# require 'capybara/webkit'
end
if Capybara.javascript_driver == :selenium

View file

@ -22,8 +22,13 @@ module TracksStepHelper
end
def open_edit_form_for(todo)
edit_link = "div#line_todo_#{todo.id} a#icon_edit_todo_#{todo.id}"
# make sure we can open the edit form
page.should have_css(edit_link)
# on calendar page there can be more than 1 occurance of a todo, so we select the first here
all(:css, "div#line_todo_#{todo.id} a#icon_edit_todo_#{todo.id}")[0].click
all(:css, edit_link)[0].click
wait_for_ajax
wait_for_animations_to_end
end