_xowiki__includelet_childresources (private)

 _xowiki__includelet_childresources

Defined in packages/xowiki/tcl/test/includelet-test-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_log aa_log (public) aa_log_result aa_log_result (public) aa_section aa_section (public) aa_true aa_true (public) acs::icanuse acs::icanuse (public) _xowiki__includelet_childresources _xowiki__includelet_childresources _xowiki__includelet_childresources->aa_log _xowiki__includelet_childresources->aa_log_result _xowiki__includelet_childresources->aa_section _xowiki__includelet_childresources->aa_true _xowiki__includelet_childresources->acs::icanuse

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
        set system_locale [lang::system::locale]
        set instance /xowiki-test
        set package_id [::acs::test::require_package_instance  -package_key xowiki  -empty  -instance_name $instance]
        try {

            ::xowiki::Package initialize -package $package_id
            set root_folder_id [::$package_id folder_id]

            lang::system::set_locale en_US
            set f_id [::xowiki::test::require_folder  "childresources-folder" $root_folder_id $package_id]

            #
            # Create sample pages for testing
            #
            foreach {title} {
                a
                A
                b
                c
                Bor
                Bar
                Bär
                bb
                -bb
                zz
            } {
                set id($title) [xowiki::test::require_form_page  -title $title  en:p$title $f_id $package_id]
            }
            ::xo::db::CrClass get_instance_from_db -item_id $id(a)

            foreach includelet {
                {child-resources -parent .. -columns {name title} -orderby title,asc}
            } {
                aa_section "$includelet"

                set HTML [$id(a) include $includelet]
                #ns_log notice "RRR $includelet => $HTML "

                acs::test::dom_html root $HTML {
                    set elements [lmap node [$root selectNodes {//tr/td[last()]}] {lindex [$node asText] 0}]
                }
                aa_log "elements: $elements"

                #
                # Run these test only when "ns_strcoll" is available
                #
                if {![::acs::icanuse "ns_strcoll"]} {
                    continue
                }

                aa_true "find Bar"  {[lsearch $elements Bar] > -1}
                aa_true "find Bär"  {[lsearch $elements Bär] > -1}
                aa_true "find Bor"  {[lsearch $elements Bor] > -1}

                aa_true "Bar before Bär"  {[lsearch $elements Bar] < [lsearch $elements Bär]}
                aa_true "Bar before Bor"  {[lsearch $elements Bar] < [lsearch $elements Bor]}
                aa_true "Bar before Bär"  {[lsearch $elements Bar] < [lsearch $elements Bär]}
                aa_true "Bär before Bor"  {[lsearch $elements Bär] < [lsearch $elements Bor]}
            }

        } finally {
            lang::system::set_locale $system_locale

            # set node_id [site_node::get_node_id -url /$instance]
            # site_node::unmount -node_id $node_id
            # site_node::delete -node_id $node_id -delete_package
        }
    }} {
          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" "includelet_childresources (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: