faq::twt::disable_enable (private)
faq::twt::disable_enable faq_name option
Defined in packages/faq/tcl/test/tclwebtest-procs.tcl
Toggle enable/disable for a FAQ from the UI.
- Parameters:
- faq_name (required)
- option (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # Option : disable or enable set response 0 db_1row faq_id "select faq_id from faqs where faq_name=:faq_name" # 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" set optionurl [export_vars -base "faq-${option}" {faq_id}] ::twt::do_request $optionurl aa_log "url:$optionurl" set response_url [tclwebtest::response url] if { [string match "*$faq_page_url*" $response_url] } { if {![catch {tclwebtest::link find ~u $optionurl } errmsg]} { aa_error "faq::twt::$option failed $errmsg : Don't $option $faq_name Faq" } else { aa_log "Faq $option" set response 1 } } else { aa_error "faq::twt::$option failed. Bad response url : $response_url " } return $responseXQL Not present: Generic, PostgreSQL, Oracle