_acs-lang__locale_select_widget (private)
_acs-lang__locale_select_widget
Defined in packages/acs-lang/tcl/test/lang-widget-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ aa_section "Edit Mode" set tag_attributes {data-att {I am another test attribute value}} array set element { html {data-test {I am a test attribute value}} values {en_US de_DE} mode edit name test-lang options {{English en_US} {Deutsch de_DE} {Italiano it_IT}} } set widget [template::widget::select_locales element $tag_attributes] aa_true "Output looks like a select HTML" { [string first "<select" $widget] >= 0 && [string first "<option" $widget] >= 0 } foreach lang_text {English en_US Deutsch de_DE Italiano it_IT} { aa_true "Output contains '$lang_text'" { [string first $lang_text $widget] >= 0 } } foreach value {it de en} { aa_true "options provide required lang attribute for '$value'" [regexp "option lang=('$value'|\"$value\")" $widget] } foreach {att value} { data-att {I am another test attribute value} data-test {I am a test attribute value} } { aa_true "Output contains '$att=\"$value\"" [regexp $att=('$value'|\"$value\") $widget] } aa_section "View Mode" set element(mode) view set widget [template::widget::select_locales element $tag_attributes] foreach value {en_US de_DE it_IT} { aa_false "Output contains hidden field for '$value'" { [string first "input type=\"hidden\" value=\"$value\"" $widget] >= 0 } } }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "locale_select_widget (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle