Index: openacs-4/packages/dotlrn-portlet/tcl/test/dotlrn-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/tcl/test/Attic/dotlrn-portlet-procs.tcl,v diff -u -r1.1.2.6 -r1.1.2.7 --- openacs-4/packages/dotlrn-portlet/tcl/test/dotlrn-portlet-procs.tcl 30 Mar 2023 15:58:36 -0000 1.1.2.6 +++ openacs-4/packages/dotlrn-portlet/tcl/test/dotlrn-portlet-procs.tcl 12 Apr 2023 12:55:52 -0000 1.1.2.7 @@ -18,7 +18,7 @@ } -cats { api smoke -} render_portlet { +} dotlrn_render_portlet { Test the rendering of the portlets } { # @@ -35,30 +35,37 @@ fetch first 1 rows only }] - set cf [list \ - community_id $community_id \ - shaded_p false \ - ] + foreach shaded_p {true false} { - foreach portlet { - dotlrn_admin_portlet dotlrn_members_portlet dotlrn_members_staff_portlet dotlrn_portlet - } { - aa_section $portlet + set cf [list \ + community_id $community_id \ + shaded_p $shaded_p \ + ] - set portlet [acs_sc::invoke \ - -contract portal_datasource \ - -operation Show \ - -impl [${portlet}::get_my_name] \ - -call_args [list $cf]] + foreach portlet { + dotlrn_admin_portlet dotlrn_members_portlet dotlrn_members_staff_portlet dotlrn_portlet + } { + set section_name $portlet + if {$shaded_p} { + append section_name " (shaded)" + } + aa_section $section_name - aa_log "Portlet returns: [ns_quotehtml $portlet]" + set portlet [acs_sc::invoke \ + -contract portal_datasource \ + -operation Show \ + -impl [${portlet}::get_my_name] \ + -call_args [list $cf]] - aa_false "No error was returned" { - [string first "Error in include template" $portlet] >= 0 - } + aa_log "Portlet returns: [ns_quotehtml $portlet]" - aa_true "Portlet looks like HTML" { - [ad_looks_like_html_p $portlet] || $portlet ne "" + aa_false "No error was returned" { + [string first "Error in include template" $portlet] >= 0 + } + + aa_true "Portlet contains something" { + [string length [string trim $portlet]] > 0 + } } } }