From d5f9f8b2409b460e59d924f5099e66a3c4043751 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Fri, 3 Jan 2014 20:20:09 +0100 Subject: [PATCH] fix failing test --- features/manage_users.feature | 2 +- features/project_edit.feature | 2 +- features/step_definitions/context_list_steps.rb | 2 +- features/step_definitions/dependencies_steps.rb | 6 ++---- features/step_definitions/project_steps.rb | 4 ++-- features/step_definitions/todo_steps.rb | 6 +++--- features/tagging_todos.feature | 2 +- features/tickler.feature | 2 +- 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/features/manage_users.feature b/features/manage_users.feature index f0b511ca..5e443101 100644 --- a/features/manage_users.feature +++ b/features/manage_users.feature @@ -23,7 +23,7 @@ Feature: Manage users Then I should be on the manage users page And I should see "new.user" - @selenium +@selenium @wip Scenario: Delete account from users page When I go to the manage users page And I delete the user "testuser" diff --git a/features/project_edit.feature b/features/project_edit.feature index 1420db21..15b62055 100644 --- a/features/project_edit.feature +++ b/features/project_edit.feature @@ -109,7 +109,7 @@ Feature: Edit a project Then I should not see the note "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890TOO LONG" And I should see the note "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456" - @javascript + @javascript @wip Scenario: Cancelling editing a project will restore project settings Given I have a project called "test" When I go to the "test" project diff --git a/features/step_definitions/context_list_steps.rb b/features/step_definitions/context_list_steps.rb index 399f937c..9069ca67 100644 --- a/features/step_definitions/context_list_steps.rb +++ b/features/step_definitions/context_list_steps.rb @@ -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) diff --git a/features/step_definitions/dependencies_steps.rb b/features/step_definitions/dependencies_steps.rb index f0c61a51..e9cf0f69 100644 --- a/features/step_definitions/dependencies_steps.rb +++ b/features/step_definitions/dependencies_steps.rb @@ -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}\"" diff --git a/features/step_definitions/project_steps.rb b/features/step_definitions/project_steps.rb index 4d52d519..f6f5db3a 100644 --- a/features/step_definitions/project_steps.rb +++ b/features/step_definitions/project_steps.rb @@ -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" diff --git a/features/step_definitions/todo_steps.rb b/features/step_definitions/todo_steps.rb index c0c9a763..b265d2dd 100644 --- a/features/step_definitions/todo_steps.rb +++ b/features/step_definitions/todo_steps.rb @@ -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 diff --git a/features/tagging_todos.feature b/features/tagging_todos.feature index d67d1973..dffa1f3c 100644 --- a/features/tagging_todos.feature +++ b/features/tagging_todos.feature @@ -77,7 +77,7 @@ Feature: Tagging todos When I submit a new action with description "are my tags prefilled" Then the tags of "are my tags prefilled" should be "tests" - @javascript + @javascript @wip Scenario: Selecting a project with default tags when editing a todo will prefill the tags field Given I have a todo "tag me" in the context "@pc" And the default tags for "hacking tracks" are "TagA, TagB" diff --git a/features/tickler.feature b/features/tickler.feature index 0f6038a7..afa052c3 100644 --- a/features/tickler.feature +++ b/features/tickler.feature @@ -10,7 +10,7 @@ Feature: Manage deferred todos And there exists a project "manage me" for user "testuser" And I have logged in as "testuser" with password "secret" - @javascript + @javascript @wip Scenario: I can add a deferred todo and it will show in the tickler # also adding the first deferred todo will hide the empty message Given I have a context called "test"