faq::twt::edit_two (private)
faq::twt::edit_two faq_name faq_new_name
Defined in packages/faq/tcl/test/tclwebtest-procs.tcl
Edits a FAQ from the UI by simulating clicks to the edit page.
- Parameters:
- faq_name (required)
- faq_new_name (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set response 0 # Edit the FAQ and request the FAQ Admin page # The Faq page url set faq_page_url [aa_get_first_url -package_key faq] ::twt::do_request $faq_page_url tclwebtest::link follow "administer" tclwebtest::link follow "$faq_name" # Clic Edit Button tclwebtest::form find ~n faq_add_edit tclwebtest::form submit aa_log " Edit form submitted" tclwebtest::form find ~n "faq_add_edit" tclwebtest::field find ~n "faq_name" tclwebtest::field fill "$faq_new_name" tclwebtest::form submit aa_log " Faq form submitted" set response_url [tclwebtest::response url] if {[string match "*admin/one-faq*" $response_url] } { if { [catch {tclwebtest::form find ~n "faq_add_edit"} errmsg] || [catch {tclwebtest::field find ~v "$faq_new_name"} errmsg] } { aa_error "faq::twt::edit_two failed $errmsg : Don't Edit a Faq" } else { aa_log "Faq Edited" set response 1 } } else { aa_error "faq::twt::edit_two failed, bad response url : $response_url" } return $responseXQL Not present: Generic, PostgreSQL, Oracle