diff --git a/app/views/todos/add_predecessor.js.erb b/app/views/todos/add_predecessor.js.erb index b760c4e1..6fad9dc4 100644 --- a/app/views/todos/add_predecessor.js.erb +++ b/app/views/todos/add_predecessor.js.erb @@ -9,7 +9,7 @@ remove_successor_from_page(); replace_updated_predecessor(); regenerate_predecessor_family(); - <%= "show_in_tickler_box();" if source_view_is_one_of :project, :tag, :context %> + <%= "show_in_tickler_box();".html_safe if source_view_is_one_of :project, :tag, :context %> TracksPages.page_notify('notice', "<%= @status_message %>", 5); function remove_successor_from_page() { diff --git a/app/views/todos/destroy.js.erb b/app/views/todos/destroy.js.erb index 8d9b1d43..86c7f68c 100644 --- a/app/views/todos/destroy.js.erb +++ b/app/views/todos/destroy.js.erb @@ -80,7 +80,7 @@ function activate_pending_todos() { $('#<%= dom_id(t) %>').fadeOut(400, function() { $('#<%= dom_id(t) %>').remove(); $('#<%= item_container_id(t) %>').append("<%= html %>"); - <%= "$('#tickler-empty-nd').show();" if @remaining_deferred_or_pending_count==0 -%> + <%= "$('#tickler-empty-nd').show();".html_safe if @remaining_deferred_or_pending_count==0 -%> }); <% else -%> $('#<%= item_container_id(t) %>').append("<%= html%>"); diff --git a/app/views/todos/toggle_check.js.erb b/app/views/todos/toggle_check.js.erb index 68adae47..f5ec6eb1 100644 --- a/app/views/todos/toggle_check.js.erb +++ b/app/views/todos/toggle_check.js.erb @@ -130,7 +130,7 @@ function activate_pending_todos(next_steps) { $('#<%= dom_id(t) %>').fadeOut(400, function() { $('#<%= dom_id(t) %>').remove(); $('#<%= item_container_id(t) %>').append("<%= html %>"); - <%= "$('#tickler-empty-nd').show();" if @remaining_deferred_or_pending_count==0 -%> + <%= "$('#tickler-empty-nd').show();".html_safe if @remaining_deferred_or_pending_count==0 -%> }); <% else -%> $('#<%= item_container_id(t) %>').append("<%= html%>"); diff --git a/features/step_definitions/dependencies_steps.rb b/features/step_definitions/dependencies_steps.rb index 80c0ae39..f0c61a51 100644 --- a/features/step_definitions/dependencies_steps.rb +++ b/features/step_definitions/dependencies_steps.rb @@ -43,10 +43,10 @@ When /^I edit the dependency of "([^"]*)" to add "([^"]*)" as predecessor$/ do | page.execute_script %Q{$("#{form_css}").find('input[id$="predecessor_input"]').autocomplete('search')} if Capybara.javascript_driver == :webkit # wait for auto complete - page.should have_css("a#ui-active-menuitem") + page.should have_css("a.ui-state-focus") # click first line - page.find(:xpath, "//ul/li[1]/a[@id='ui-active-menuitem']").click + page.find(:css, "ul li a.ui-state-focus").click # wait for the new dependency to be added to the list page.should have_css("li#pred_#{predecessor.id}") @@ -97,6 +97,13 @@ Then /^I should see "([^\"]*)" within the dependencies of "([^\"]*)"$/ do |succe todo = @current_user.todos.find_by_description(todo_description) todo.should_not be_nil + # 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 + end + step "I should see \"#{successor_description}\" within \"div#line_todo_#{todo.id}\"" end diff --git a/features/step_definitions/todo_steps.rb b/features/step_definitions/todo_steps.rb index dcf5253e..c0c9a763 100644 --- a/features/step_definitions/todo_steps.rb +++ b/features/step_definitions/todo_steps.rb @@ -15,7 +15,8 @@ When /^I delete the action "([^"]*)"$/ do |action_description| get_confirm_text.should == "Are you sure that you want to delete the action '#{todo.description}'?" wait_for_ajax - wait_for_animations_to_end + # commented out: the notice is gone if you want to check for it + # wait_for_animations_to_end end When /^I delete the todo "([^"]*)"$/ do |action_description|