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.7 -r1.5.2.8 --- openacs-4/packages/evaluation-portlet/tcl/test/evaluation-portlet-procs.tcl 9 Sep 2022 13:03:10 -0000 1.5.2.7 +++ openacs-4/packages/evaluation-portlet/tcl/test/evaluation-portlet-procs.tcl 30 Mar 2023 16:40:31 -0000 1.5.2.8 @@ -6,6 +6,48 @@ } +aa_register_case -procs { + evaluation_admin_portlet::show + evaluation_assignments_portlet::show + evaluation_evaluations_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 evaluation \ + -node_name __test_evaluation_portlet] + + set cf [list \ + package_id $package_id \ + shaded_p false \ + ] + + foreach portlet { + evaluation_admin_portlet evaluation_assignments_portlet evaluation_evaluations_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] + } + } +} + aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_add_task { Test Add a Task to GradeBook. Index: openacs-4/packages/news-portlet/tcl/test/news-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/tcl/test/news-portlet-procs.tcl,v diff -u -r1.1.2.5 -r1.1.2.6 --- openacs-4/packages/news-portlet/tcl/test/news-portlet-procs.tcl 5 Oct 2020 14:18:37 -0000 1.1.2.5 +++ openacs-4/packages/news-portlet/tcl/test/news-portlet-procs.tcl 30 Mar 2023 16:42:06 -0000 1.1.2.6 @@ -7,6 +7,45 @@ } aa_register_case -procs { + news_admin_portlet::show + news_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 news \ + -node_name __test_news_portlet] + + set cf [list \ + package_id $package_id \ + shaded_p false \ + ] + + foreach portlet {news_admin_portlet news_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] + } + } +} + +aa_register_case -procs { news_portlet::link news_portlet::get_pretty_name news_admin_portlet::link