Index: openacs-4/packages/assessment-portlet/tcl/test/assessment-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment-portlet/tcl/test/assessment-portlet-procs.tcl,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/assessment-portlet/tcl/test/assessment-portlet-procs.tcl 30 Mar 2023 15:32:52 -0000 1.1.2.4 +++ openacs-4/packages/assessment-portlet/tcl/test/assessment-portlet-procs.tcl 12 Apr 2023 12:30:31 -0000 1.1.2.5 @@ -20,28 +20,36 @@ -package_key assessment \ -node_name __test_assessment_portlet] - set cf [list \ - package_id $package_id \ - shaded_p false \ - ] + foreach shaded_p {true false} { - foreach portlet {assessment_admin_portlet assessment_portlet} { - aa_section $portlet + set cf [list \ + package_id $package_id \ + shaded_p $shaded_p \ + ] - set portlet [acs_sc::invoke \ - -contract portal_datasource \ - -operation Show \ - -impl $portlet \ - -call_args [list $cf]] + foreach portlet {assessment_admin_portlet assessment_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 \ + -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] || " " in $portlet} + aa_false "No error was returned" { + [string first "Error in include template" $portlet] >= 0 + } + + aa_true "Portlet contains something" { + [string length $portlet] >= 0 + } + } } } } Index: openacs-4/packages/bm-portlet/tcl/test/bm-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bm-portlet/tcl/test/bm-portlet-procs.tcl,v diff -u -r1.1.2.5 -r1.1.2.6 --- openacs-4/packages/bm-portlet/tcl/test/bm-portlet-procs.tcl 30 Mar 2023 14:47:05 -0000 1.1.2.5 +++ openacs-4/packages/bm-portlet/tcl/test/bm-portlet-procs.tcl 12 Apr 2023 12:39:32 -0000 1.1.2.6 @@ -19,26 +19,36 @@ -package_key bulk-mail \ -node_name __test_bm_portlet] - set cf [list \ - package_id $package_id \ - shaded_p false \ - scoped_p false \ - ] + foreach shaded_p {true false} { + set portlet bm_portlet + set section_name $portlet + if {$shaded_p} { + append section_name " (shaded)" + } + aa_section $section_name - set portlet [acs_sc::invoke \ - -contract portal_datasource \ - -operation Show \ - -impl bm_portlet \ - -call_args [list $cf]] + set cf [list \ + package_id $package_id \ + shaded_p $shaded_p \ + scoped_p false \ + ] - aa_log "Portlet returns: [ns_quotehtml $portlet]" + set portlet [acs_sc::invoke \ + -contract portal_datasource \ + -operation Show \ + -impl $portlet \ + -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] + 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 + } + } } }