setup :fixtures => :all login :as => 'admin' open "/contexts" click "css=#context_3 .buttons img.edit_item" wait_for_visible "edit_context_3" wait_for_not_visible "context_3" type "//div[@id='edit_context_3'] //input[@name='context[name]']", "telegraph" click "//div[@id='edit_context_3'] //button" wait_for_not_visible "edit_context_3" wait_for_visible "context_3" click "css=#context_3 .buttons img.delete_item" assert_confirmation "Are you sure that you want to delete the context 'telegraph'?" wait_for_visible "flash" wait_for_text "flash", "Deleted context 'telegraph'" wait_for_element_not_present "context_3"