mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-20 01:00:13 +01:00
Deleting the last todo should hide a context
This commit is contained in:
parent
93c6151ca7
commit
c1dfeaf0f2
2 changed files with 8 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ if @saved
|
||||||
page['badge_count'].replace_html @down_count
|
page['badge_count'].replace_html @down_count
|
||||||
|
|
||||||
# remove context if empty
|
# 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
|
# show message if there are no actions
|
||||||
page[empty_container_msg_div_id].show if !empty_container_msg_div_id.nil? && @down_count == 0
|
page[empty_container_msg_div_id].show if !empty_container_msg_div_id.nil? && @down_count == 0
|
||||||
|
|
|
||||||
7
test/selenium/home/delete_todo_empty_context.rsel
Normal file
7
test/selenium/home/delete_todo_empty_context.rsel
Normal file
|
|
@ -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"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue