fix failing test

This commit is contained in:
Reinier Balt 2014-01-03 20:20:09 +01:00
parent f42a5d3bdd
commit d5f9f8b240
8 changed files with 12 additions and 14 deletions

View file

@ -94,7 +94,7 @@ end
Then /^I should (see|not see) empty message for (active|hidden) contexts$/ do |visible, state|
box = (state=='active') ? "div#active-contexts-empty-nd" : "div#hidden-contexts-empty-nd"
elem = page.find(box)
elem = page.find(box, :visible => false)
elem.should_not be_nil
elem.send(visible=="see" ? "should" : "should_not", be_visible)

View file

@ -69,7 +69,7 @@ When /^I edit the dependency of "([^"]*)" to remove "([^"]*)" as predecessor$/ d
submit_edit_todo_form(todo)
wait_for_ajax
wait_for_animations_to_end
# wait_for_animations_to_end
end
When /^I edit the dependency of "([^"]*)" to "([^"]*)"$/ do |todo_name, deps|
@ -99,9 +99,7 @@ Then /^I should see "([^\"]*)" within the dependencies of "([^\"]*)"$/ do |succe
# open successors
within "div#line_todo_#{todo.id}" do
if !find(:css, "div#successors_todo_#{todo.id}").visible?
find(:css, "a.show_successors").click
end
find(:css, "a.show_successors", :visible => false).click
end
step "I should see \"#{successor_description}\" within \"div#line_todo_#{todo.id}\""

View file

@ -240,7 +240,7 @@ Then /^I should (see|not see) empty message for (todos|deferred todos|completed
css = "div#tickler-empty-nd" if state == "deferred todos"
css = "div#empty-d" if state == "completed todos"
elem = find(css)
elem = find(css, :visible=>false)
elem.should_not be_nil
elem.send(visible=="see" ? "should" : "should_not", be_visible)
end
@ -306,7 +306,7 @@ end
Then /^I should (see|not see) the default project settings$/ do |visible|
default_settings = "This project is active with no default context and with no default tags"
page.should have_css("div.project_settings")
page.should have_css("div.project_settings", :visible => false)
elem = page.find("div.project_settings")
if visible == "see"

View file

@ -152,12 +152,12 @@ Then /^I should see "([^"]*)" in the completed section of the mobile site$/ do |
end
Then /^I should (see|not see) empty message for (completed todos|todos) of home/ do |visible, kind_of_todo|
elem = find(kind_of_todo=="todos" ? "div#no_todos_in_view" : "div#empty-d")
elem = find( (kind_of_todo=="todos" ? "div#no_todos_in_view" : "div#empty-d"), :visible=>false)
elem.send(visible=="see" ? "should" : "should_not", be_visible)
end
Then /^I should (see|not see) the empty tickler message$/ do |see|
elem = find("div#tickler-empty-nd")
elem = find("div#tickler-empty-nd", :visible => false)
elem.send(see=="see" ? "should" : "should_not", be_visible)
end
@ -165,5 +165,5 @@ Then /^I should (see|not see) the notes of "([^"]*)"$/ do |visible, todo_descrip
todo = @current_user.todos.find_by_description(todo_description)
todo.should_not be_nil
page.find("div#notes_todo_#{todo.id}").send(visible=="see" ? "should" : "should_not", be_visible)
page.find("div#notes_todo_#{todo.id}", :visible => false).send(visible=="see" ? "should" : "should_not", be_visible)
end