Index: openacs-4/packages/calendar-portlet/tcl/test/calendar-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/tcl/test/calendar-portlet-procs.tcl,v diff -u -r1.5.2.9 -r1.5.2.10 --- openacs-4/packages/calendar-portlet/tcl/test/calendar-portlet-procs.tcl 30 Mar 2023 15:26:28 -0000 1.5.2.9 +++ openacs-4/packages/calendar-portlet/tcl/test/calendar-portlet-procs.tcl 12 Apr 2023 12:49:31 -0000 1.5.2.10 @@ -499,19 +499,18 @@ -calendar_name __test_portlet_calendar \ -package_id $package_id] - aa_section "Standard Portlet" + aa_section "Admin Portlet" foreach default_view {day list week month} { set cf [list \ calendar_id $calendar_id \ - default_view $default_view \ - shaded_p false + default_view $default_view ] set portlet [acs_sc::invoke \ -contract portal_datasource \ -operation Show \ - -impl [calendar_portlet::get_my_name] \ + -impl [calendar_admin_portlet::get_my_name] \ -call_args [list $cf]] aa_log "Portlet returns: [ns_quotehtml $portlet]" @@ -520,85 +519,104 @@ [string first "Error in include template" $portlet] >= 0 } - aa_true "View: $default_view - Portlet looks like HTML" \ - [ad_looks_like_html_p $portlet] + aa_true "View: $default_view - Portlet contains something" { + [string length [string trim $portlet]] > 0 + } } + foreach shaded_p {true false} { + set section_name "Standard Portlet" + if {$shaded_p} { + append section_name " (shaded)" + } + aa_section $section_name - aa_section "Admin Portlet" + foreach default_view {day list week month} { + set cf [list \ + calendar_id $calendar_id \ + default_view $default_view \ + shaded_p $shaded_p + ] - foreach default_view {day list week month} { - set cf [list \ - calendar_id $calendar_id \ - default_view $default_view - ] + set portlet [acs_sc::invoke \ + -contract portal_datasource \ + -operation Show \ + -impl [calendar_portlet::get_my_name] \ + -call_args [list $cf]] - set portlet [acs_sc::invoke \ - -contract portal_datasource \ - -operation Show \ - -impl [calendar_admin_portlet::get_my_name] \ - -call_args [list $cf]] + aa_log "Portlet returns: [ns_quotehtml $portlet]" - aa_log "Portlet returns: [ns_quotehtml $portlet]" + aa_false "View: $default_view - No error was returned" { + [string first "Error in include template" $portlet] >= 0 + } - aa_false "View: $default_view - No error was returned" { - [string first "Error in include template" $portlet] >= 0 + aa_true "View: $default_view - Portlet contains something" { + [string length [string trim $portlet]] > 0 + } } - aa_true "View: $default_view - Portlet looks like HTML" \ - [ad_looks_like_html_p $portlet] - } + set section_name "List Portlet" + if {$shaded_p} { + append section_name " (shaded)" + } + aa_section $section_name - aa_section "List Portlet" + foreach default_view {day list week month} { + set cf [list \ + calendar_id $calendar_id \ + default_view $default_view \ + scoped_p false \ + shaded_p $shaded_p \ + ] - foreach default_view {day list week month} { - set cf [list \ - calendar_id $calendar_id \ - default_view $default_view \ - scoped_p false \ - shaded_p false \ - ] + set portlet [acs_sc::invoke \ + -contract portal_datasource \ + -operation Show \ + -impl [calendar_list_portlet::get_my_name] \ + -call_args [list $cf]] - set portlet [acs_sc::invoke \ - -contract portal_datasource \ - -operation Show \ - -impl [calendar_list_portlet::get_my_name] \ - -call_args [list $cf]] + aa_log "Portlet returns: [ns_quotehtml $portlet]" - aa_log "Portlet returns: [ns_quotehtml $portlet]" + aa_false "View: $default_view - No error was returned" { + [string first "Error in include template" $portlet] >= 0 + } - aa_false "View: $default_view - No error was returned" { - [string first "Error in include template" $portlet] >= 0 + aa_true "View: $default_view - Portlet contains something" { + [string length [string trim $portlet]] > 0 + } } - aa_true "View: $default_view - Portlet looks like HTML" \ - [ad_looks_like_html_p $portlet] - } + set section_name "Full Portlet" + if {$shaded_p} { + append section_name " (shaded)" + } + aa_section $section_name - aa_section "Full Portlet" + foreach default_view {day list week month} { + set cf [list \ + calendar_id $calendar_id \ + default_view $default_view \ + scoped_p false \ + shaded_p $shaded_p \ + ] - foreach default_view {day list week month} { - set cf [list \ - calendar_id $calendar_id \ - default_view $default_view \ - scoped_p false \ - shaded_p false \ - ] + set portlet [acs_sc::invoke \ + -contract portal_datasource \ + -operation Show \ + -impl [calendar_full_portlet::get_my_name] \ + -call_args [list $cf]] - set portlet [acs_sc::invoke \ - -contract portal_datasource \ - -operation Show \ - -impl [calendar_full_portlet::get_my_name] \ - -call_args [list $cf]] + aa_log "Portlet returns: [ns_quotehtml $portlet]" - aa_log "Portlet returns: [ns_quotehtml $portlet]" + aa_false "View: $default_view - No error was returned" { + [string first "Error in include template" $portlet] >= 0 + } - aa_false "View: $default_view - No error was returned" { - [string first "Error in include template" $portlet] >= 0 + aa_true "View: $default_view - Portlet contains something" { + [string length [string trim $portlet]] > 0 + } } - aa_true "View: $default_view - Portlet looks like HTML" \ - [ad_looks_like_html_p $portlet] } } -teardown_code { ad_conn -set user_id $orig_user_id Index: openacs-4/packages/chat-portlet/tcl/test/chat-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat-portlet/tcl/test/chat-portlet-procs.tcl,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/chat-portlet/tcl/test/chat-portlet-procs.tcl 30 Mar 2023 14:45:11 -0000 1.1.2.4 +++ openacs-4/packages/chat-portlet/tcl/test/chat-portlet-procs.tcl 12 Apr 2023 12:52:26 -0000 1.1.2.5 @@ -20,27 +20,35 @@ -package_key chat \ -node_name __test_chat_portlet] - set cf [list \ - package_id $package_id \ - shaded_p false \ - ] + foreach shaded_p {true false} { + set cf [list \ + package_id $package_id \ + shaded_p $shaded_p \ + ] - foreach portlet {chat_portlet chat_admin_portlet} { + foreach portlet {chat_portlet chat_admin_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 $portlet \ - -call_args [list $cf]] + set portlet [acs_sc::invoke \ + -contract portal_datasource \ + -operation Show \ + -impl $portlet \ + -call_args [list $cf]] - aa_log "Portlet returns: [ns_quotehtml $portlet]" + aa_log "Portlet returns: [ns_quotehtml $portlet]" - aa_false "No error was returned" { - [string first "Error in include template" $portlet] >= 0 - } + aa_false "No error was returned" { + [string first "Error in include template" $portlet] >= 0 + } - aa_true "Portlet looks like HTML" \ - [ad_looks_like_html_p $portlet] + aa_true "Portlet contains something" { + [string length [string trim $portlet]] > 0 + } + } } } } Index: openacs-4/packages/dotlrn-portlet/tcl/test/dotlrn-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/tcl/test/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 + } } } } Index: openacs-4/packages/evaluation-portlet/tcl/test/evaluation-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/tcl/test/evaluation-portlet-procs.tcl,v diff -u -r1.5.2.8 -r1.5.2.9 --- openacs-4/packages/evaluation-portlet/tcl/test/evaluation-portlet-procs.tcl 30 Mar 2023 16:40:31 -0000 1.5.2.8 +++ openacs-4/packages/evaluation-portlet/tcl/test/evaluation-portlet-procs.tcl 12 Apr 2023 12:58:29 -0000 1.5.2.9 @@ -13,37 +13,46 @@ } -cats { api smoke -} render_portlet { +} evaluation_render_portlet { Test the rendering of the portlets } { aa_run_with_teardown -rollback -test_code { set package_id [site_node::instantiate_and_mount \ -package_key evaluation \ -node_name __test_evaluation_portlet] - set cf [list \ - package_id $package_id \ - shaded_p false \ - ] + foreach shaded_p {true false} { - foreach portlet { - evaluation_admin_portlet evaluation_assignments_portlet evaluation_evaluations_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 { + evaluation_admin_portlet evaluation_assignments_portlet evaluation_evaluations_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] + 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 + } + } } } }