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.3 -r1.1.2.4 --- openacs-4/packages/assessment-portlet/tcl/test/assessment-portlet-procs.tcl 5 Oct 2020 13:23:15 -0000 1.1.2.3 +++ openacs-4/packages/assessment-portlet/tcl/test/assessment-portlet-procs.tcl 30 Mar 2023 15:32:52 -0000 1.1.2.4 @@ -7,6 +7,46 @@ } aa_register_case -procs { + assessment_admin_portlet::show + assessment_portlet::show +} -cats { + api + smoke +} 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 assessment \ + -node_name __test_assessment_portlet] + + set cf [list \ + package_id $package_id \ + shaded_p false \ + ] + + foreach portlet {assessment_admin_portlet assessment_portlet} { + aa_section $portlet + + set portlet [acs_sc::invoke \ + -contract portal_datasource \ + -operation Show \ + -impl $portlet \ + -call_args [list $cf]] + + aa_log "Portlet returns: [ns_quotehtml $portlet]" + + 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] || " " in $portlet} + } + } +} + +aa_register_case -procs { assessment_admin_portlet::link assessment_portlet::link assessment_admin_portlet::get_pretty_name