tracks/test/selenium/home/create_todo_in_completed_project.rsel
2008-05-20 21:28:26 +01:00

31 lines
No EOL
821 B
Text

setup :fixtures => :all
login :as => 'admin'
open "/"
# we should start with 10 actions on home page
assert_text 'badge_count', '10'
# set project to hidden state
open "/projects/2"
click 'project_state_completed'
# wait for flash before navigating away from project page
wait_for_visible "flash"
# monitor badge count on home page. It should be 7 at the start
open "/"
wait_for_visible 'badge_count'
assert_text 'badge_count', '7'
# add todo to hidden project
type "todo_description", "should be hidden"
type "todo_project_name", "Make more money than Billy Gates"
type "todo_context_name", "agenda"
click "css=#todo-form-new-action .submit_box button"
# wait for flash to appear
wait_for_visible "flash"
verify_text_not_present 'should be hidden'
# badge count should still be same
assert_text 'badge_count', '7'