Index: openacs-4/packages/fs-portlet/tcl/test/fs-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/tcl/test/fs-portlet-procs.tcl,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/fs-portlet/tcl/test/fs-portlet-procs.tcl 6 Oct 2020 16:02:38 -0000 1.1.2.4 +++ openacs-4/packages/fs-portlet/tcl/test/fs-portlet-procs.tcl 30 Mar 2023 16:27:47 -0000 1.1.2.5 @@ -7,6 +7,50 @@ } aa_register_case -procs { + fs_admin_portlet::show + fs_contents_portlet::show + fs_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 file-storage \ + -node_name __test_fs_portlet] + + set folder_id [fs::get_root_folder -package_id $package_id] + + set cf [list \ + folder_id $folder_id \ + shaded_p false \ + scoped_p false \ + contents_url /some-url/ + ] + + foreach portlet {fs_admin_portlet fs_contents_portlet fs_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 { fs_admin_portlet::link fs_portlet::link fs_contents_portlet::link