Index: openacs-4/packages/file-storage/tcl/test/file-storage-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/test/file-storage-procs.tcl,v diff -u -r1.2.6.1 -r1.2.6.2 --- openacs-4/packages/file-storage/tcl/test/file-storage-procs.tcl 2 Feb 2006 15:28:07 -0000 1.2.6.1 +++ openacs-4/packages/file-storage/tcl/test/file-storage-procs.tcl 31 Oct 2006 06:30:20 -0000 1.2.6.2 @@ -31,7 +31,7 @@ } } -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_create_folder { +aa_register_case -cats {web smoke} -libraries tclwebtest fs_create_folder { Test Load File. @@ -45,7 +45,7 @@ array set user_info [twt::user::create -admin] twt::user::login $user_info(email) $user_info(password) - file_storage::twt::go_to_dotlrn_my_files_page_url + file_storage::twt::call_fs_page # Create a new folder set folder_name [ad_generate_random_string] @@ -58,7 +58,7 @@ } } -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_delete_folder { +aa_register_case -cats {web smoke} -libraries tclwebtest fs_delete_folder { Test Delete a Folder. @@ -72,7 +72,8 @@ array set user_info [twt::user::create -admin] twt::user::login $user_info(email) $user_info(password) - file_storage::twt::go_to_dotlrn_my_files_page_url + file_storage::twt::call_fs_page + # Create a new folder set folder_name [ad_generate_random_string] @@ -88,7 +89,7 @@ } } -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_edit_folder { +aa_register_case -cats {web smoke} -libraries tclwebtest fs_edit_folder { Test Edit a Folder. @@ -101,9 +102,9 @@ # Login user array set user_info [twt::user::create -admin] twt::user::login $user_info(email) $user_info(password) + + file_storage::twt::call_fs_page - file_storage::twt::go_to_dotlrn_my_files_page_url - # Create a new folder set folder_name [ad_generate_random_string] set folder_description [ad_generate_random_string] @@ -119,7 +120,7 @@ } } -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_add_file_to_folder { +aa_register_case -cats {web smoke} -libraries tclwebtest fs_add_file_to_folder { Test Upload a File in a Folder. @@ -133,7 +134,7 @@ array set user_info [twt::user::create -admin] twt::user::login $user_info(email) $user_info(password) - file_storage::twt::go_to_dotlrn_my_files_page_url + file_storage::twt::call_fs_page # Create a new folder set folder_name [ad_generate_random_string] @@ -152,7 +153,7 @@ } } -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_create_url_in_folder { +aa_register_case -cats {web smoke} -libraries tclwebtest fs_create_url_in_folder { Test Create a URL in a Folder. @@ -165,9 +166,9 @@ # Login user array set user_info [twt::user::create -admin] twt::user::login $user_info(email) $user_info(password) + + file_storage::twt::call_fs_page - file_storage::twt::go_to_dotlrn_my_files_page_url - # Create an URL in a folder set url_title [ad_generate_random_string] set url "e-lane.org" @@ -180,7 +181,7 @@ } } -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_create_url { +aa_register_case -cats {web smoke} -libraries tclwebtest fs_create_url { Test Create a URL. @@ -193,9 +194,9 @@ # Login user array set user_info [twt::user::create -admin] twt::user::login $user_info(email) $user_info(password) + + file_storage::twt::call_fs_page - file_storage::twt::go_to_dotlrn_my_files_page_url - # Create an URL set url_title [ad_generate_random_string] set url "e-lane.org" @@ -208,73 +209,9 @@ } } -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_edit_url { - - Test Edit an URL. - - @author Mounir Lallali -} { - aa_run_with_teardown -test_code { - - tclwebtest::cookies clear - - # Login user - array set user_info [twt::user::create -admin] - twt::user::login $user_info(email) $user_info(password) - - file_storage::twt::go_to_dotlrn_my_files_page_url - # Create an URL - set url_title [ad_generate_random_string] - set url "e-lane.org" - set url_description [ad_generate_random_string] - file_storage::twt::create_url $url_title $url $url_description - - # Edit an URL - set new_url_title [ad_generate_random_string] - set new_url "dotlrn.org" - set new_url_description [ad_generate_random_string] - set response [file_storage::twt::edit_url $new_url_title $new_url $new_url_description] +aa_register_case -cats {web smoke} -libraries tclwebtest fs_upload_file { - aa_display_result -response $response -explanation {for editing an URL} - - twt::user::logout - } -} - -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_delete_url { - - Test Delete an URL. - - @author Mounir Lallali -} { - aa_run_with_teardown -test_code { - - tclwebtest::cookies clear - - # Login user - array set user_info [twt::user::create -admin] - twt::user::login $user_info(email) $user_info(password) - - file_storage::twt::go_to_dotlrn_my_files_page_url - - # Create an URL - set url_title [ad_generate_random_string] - set url "e-lane.org" - set url_description [ad_generate_random_string] - file_storage::twt::create_url $url_title $url $url_description - - # Delete an URL - set response [file_storage::twt::delete_url $url_title] - - aa_display_result -response $response -explanation {for deleting an URL} - - twt::user::logout - } -} - -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_upload_file { - Test Upload a File. @author Mounir Lallali @@ -286,9 +223,9 @@ # Login user array set user_info [twt::user::create -admin] twt::user::login $user_info(email) $user_info(password) + + file_storage::twt::call_fs_page - file_storage::twt::go_to_dotlrn_my_files_page_url - # Upload a File set uploaded_file_name [file_storage::twt::create_file [ad_generate_random_string]] set uploaded_file_description [ad_generate_random_string] @@ -301,145 +238,6 @@ } } -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_delete_file { - - Test Delete a File. - - @author Mounir Lallali -} { - aa_run_with_teardown -test_code { - - tclwebtest::cookies clear - - # Login user - array set user_info [twt::user::create -admin] - twt::user::login $user_info(email) $user_info(password) - - file_storage::twt::go_to_dotlrn_my_files_page_url - - # Upload a file - set uploaded_file_name [file_storage::twt::create_file [ad_generate_random_string]] - set uploaded_file_description [ad_generate_random_string] - file_storage::twt::upload_file $uploaded_file_name $uploaded_file_description - - # Delete a file - set response [file_storage::twt::delete_uploaded_file $uploaded_file_name] - aa_display_result -response $response -explanation {for deleting a file} - - file_storage:::twt::delete_file $uploaded_file_name - twt::user::logout - } -} -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_rename_file { - Test Rename a File. - @author Mounir Lallali -} { - aa_run_with_teardown -test_code { - - tclwebtest::cookies clear - - # Login user - array set user_info [twt::user::create -admin] - twt::user::login $user_info(email) $user_info(password) - - file_storage::twt::go_to_dotlrn_my_files_page_url - - # Upload a file - set uploaded_file_name [file_storage::twt::create_file [ad_generate_random_string]] - set uploaded_file_description [ad_generate_random_string] - file_storage::twt::upload_file $uploaded_file_name $uploaded_file_description - - # Rename a file - set new_file_name [ad_generate_random_string] - set response [file_storage::twt::rename_file $new_file_name] - aa_display_result -response $response -explanation {for renaming a file} - - file_storage:::twt::delete_file $uploaded_file_name - twt::user::logout - } -} - -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_copy_file { - - Test Copy a File in another folder. - - @author Mounir Lallali -} { - aa_run_with_teardown -test_code { - - tclwebtest::cookies clear - - # Login user - array set user_info [twt::user::create -admin] - twt::user::login $user_info(email) $user_info(password) - - file_storage::twt::go_to_dotlrn_my_files_page_url - - # Create a new folder - set folder_name [ad_generate_random_string] - set folder_description [ad_generate_random_string] - set response [file_storage::twt::create_new_folder $folder_name $folder_description] - - # The file storage dotlrn page - ::twt::do_request "/dotlrn/control-panel" - tclwebtest::link follow {My Files} - - # Upload a file - set uploaded_file_name [file_storage::twt::create_file [ad_generate_random_string]] - set uploaded_file_description [ad_generate_random_string] - file_storage::twt::upload_file $uploaded_file_name $uploaded_file_description - - # Copy a file in another folder - set response [file_storage::twt::copy_file $folder_name $uploaded_file_name] - aa_display_result -response $response -explanation {for copying a file in another folder} - - file_storage:::twt::delete_file $uploaded_file_name - twt::user::logout - } -} - -aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_move_file { - - Test Move a File in another folder. - - @author Mounir Lallali -} { - aa_run_with_teardown -test_code { - - tclwebtest::cookies clear - - # Login user - array set user_info [twt::user::create -admin] - twt::user::login $user_info(email) $user_info(password) - - file_storage::twt::go_to_dotlrn_my_files_page_url - - # Create a new folder - set folder_name [ad_generate_random_string] - set folder_description [ad_generate_random_string] - set response [file_storage::twt::create_new_folder $folder_name $folder_description] - - # The file storage dotlrn page - ::twt::do_request "/dotlrn/control-panel" - tclwebtest::link follow {My Files} - - # Upload a file - set uploaded_file_name [file_storage::twt::create_file [ad_generate_random_string]] - set uploaded_file_description [ad_generate_random_string] - file_storage::twt::upload_file $uploaded_file_name $uploaded_file_description - - # Move a file in another folder - set response [file_storage::twt::move_file $folder_name $uploaded_file_name] - aa_display_result -response $response -explanation {for moving a file in another folder} - - file_storage:::twt::delete_file $uploaded_file_name - twt::user::logout - } -} - - - -