mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-11 07:02:36 +01:00
parent
0eec884428
commit
9ddd5c5d2a
4 changed files with 17 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ if @saved
|
||||||
if @new_context_created
|
if @new_context_created
|
||||||
page.insert_html :top, 'display_box', :partial => 'contexts/context', :locals => { :context => @todo.context, :collapsible => true }
|
page.insert_html :top, 'display_box', :partial => 'contexts/context', :locals => { :context => @todo.context, :collapsible => true }
|
||||||
else
|
else
|
||||||
page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@todo.context_id}" if source_view_is_one_of(:todo, :deferred)
|
page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@todo.context_id}" if source_view_is_one_of(:todo, :deferred, :tag)
|
||||||
page.insert_html :bottom, item_container_id(@todo), :partial => 'todos/todo', :locals => { :todo => @todo, :parent_container_type => parent_container_type, :source_view => @source_view }
|
page.insert_html :bottom, item_container_id(@todo), :partial => 'todos/todo', :locals => { :todo => @todo, :parent_container_type => parent_container_type, :source_view => @source_view }
|
||||||
page.visual_effect :highlight, dom_id(@todo), :duration => 3
|
page.visual_effect :highlight, dom_id(@todo), :duration => 3
|
||||||
page[empty_container_msg_div_id].hide unless empty_container_msg_div_id.nil?
|
page[empty_container_msg_div_id].hide unless empty_container_msg_div_id.nil?
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ if @saved
|
||||||
end
|
end
|
||||||
|
|
||||||
# remove container if empty
|
# remove container if empty
|
||||||
if @remaining_in_context == 0 && source_view_is(:todo)
|
if @remaining_in_context == 0 && source_view_is_one_of(:todo, :tag)
|
||||||
page.visual_effect :fade, "c"+@todo.context.id.to_s, :duration => 0.4
|
page.visual_effect :fade, "c"+@todo.context.id.to_s, :duration => 0.4
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
7
test/selenium/tags/complete_last_todo.rsel
Normal file
7
test/selenium/tags/complete_last_todo.rsel
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#Test for issue #952
|
||||||
|
setup :fixtures => :all
|
||||||
|
login :as => 'admin'
|
||||||
|
open "/todos/tag/foo"
|
||||||
|
click "css=#line_todo_2 .item-checkbox"
|
||||||
|
wait_for_element_not_present "css=#c2 #line_todo_2"
|
||||||
|
wait_for_not_visible "c2"
|
||||||
8
test/selenium/tags/create_todo_in_hidden_context.rsel
Normal file
8
test/selenium/tags/create_todo_in_hidden_context.rsel
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
setup :fixtures => :all
|
||||||
|
login :as => 'admin'
|
||||||
|
open "/todos/tag/foo"
|
||||||
|
type "todo_description", "run around"
|
||||||
|
type "todo_context_name", "freetime"
|
||||||
|
click "todo_new_action_submit"
|
||||||
|
wait_for_visible "flash"
|
||||||
|
assert_text "css=#c7items div.description span", "run around"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue