setup :fixtures => :all
login :as => 'admin'
open "/projects"
click "css=#project_2 .buttons img.edit_item"
wait_for_visible "edit_project_2"
wait_for_not_visible "project_2"
type "//div[@id='edit_project_2'] //input[@name='project[name]']", "become a billionaire"
click "//div[@id='edit_project_2'] //input[@value='Update']"
wait_for_not_visible "edit_project_2"
wait_for_visible "project_2"
assert_text 'css=#project_2 .data a', 'become a billionaire' 
click "css=#project_2 .buttons img.edit_item"
wait_for_visible "edit_project_2"
wait_for_not_visible "project_2"
type "//div[@id='edit_project_2'] //input[@name='project[name]']", "become a multi-millionaire"
click "//div[@id='edit_project_2'] //input[@value='Update']"
wait_for_not_visible "edit_project_2"
wait_for_visible "project_2"
assert_text 'css=#project_2 .data a', 'become a multi-millionaire'