diff --git a/app/views/todos/destroy.js.rjs b/app/views/todos/destroy.js.rjs index bb0b42ec..8d7d5666 100644 --- a/app/views/todos/destroy.js.rjs +++ b/app/views/todos/destroy.js.rjs @@ -4,7 +4,7 @@ if @saved page['badge_count'].replace_html @down_count # remove context if empty - page.visual_effect :fade, item_container_id(@todo), :duration => 0.4 if source_view_is_one_of(:todo, :deferred) && @remaining_in_context == 0 + page.visual_effect(:fade, "c#{@todo.context_id}", :duration => 0.4) if (@remaining_in_context == 0) # show message if there are no actions page[empty_container_msg_div_id].show if !empty_container_msg_div_id.nil? && @down_count == 0 diff --git a/test/selenium/home/delete_todo_empty_context.rsel b/test/selenium/home/delete_todo_empty_context.rsel new file mode 100644 index 00000000..d3dca914 --- /dev/null +++ b/test/selenium/home/delete_todo_empty_context.rsel @@ -0,0 +1,7 @@ +setup :fixtures => :all +login :as => 'admin' +open "/" +wait_for_element_present '//div[@id="line_todo_5"]//img[@alt="Delete"]/..' +click '//div[@id="line_todo_5"]//img[@alt="Delete"]/..' +assert_confirmation "Are you sure that you want to delete the action 'Construct time dilation device'?" +wait_for_not_visible "c5"