file_storage::test::create_new_folder (private)

 file_storage::test::create_new_folder -last_request last_request \
    folder_name folder_description

Defined in packages/file-storage/tcl/test/webtest-procs.tcl

Create a new folder via Web UI.

Switches:
-last_request (required)
Parameters:
folder_name (required)
folder_description (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_file-storage file-storage (test ) file_storage::test::create_new_folder file_storage::test::create_new_folder test_file-storage->file_storage::test::create_new_folder test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) test_fs_add_file_to_folder->file_storage::test::create_new_folder test_fs_create_folder fs_create_folder (test ) test_fs_create_folder->file_storage::test::create_new_folder test_fs_edit_folder fs_edit_folder (test file-storage) test_fs_edit_folder->file_storage::test::create_new_folder aa_error aa_error (public) file_storage::test::create_new_folder->aa_error aa_true aa_true (public) file_storage::test::create_new_folder->aa_true acs::test::follow_link acs::test::follow_link (public) file_storage::test::create_new_folder->acs::test::follow_link acs::test::form_reply acs::test::form_reply (public) file_storage::test::create_new_folder->acs::test::form_reply acs::test::get_form acs::test::get_form (public) file_storage::test::create_new_folder->acs::test::get_form

Testcases:
fs_create_folder, file-storage, fs_edit_folder, fs_add_file_to_folder
Source code:
        #
        # Create a new folder based on the current page, which is from
        # a file-storage instance
        #
        set d [acs::test::follow_link -last_request $last_request -label {New Folder}]
        acs::test::reply_has_status_code $d 200

        set response [dict get $d body]
        set form [acs::test::get_form $response {//form[@id='folder-ae']}]
        aa_true "create form was returned" {[llength $form] > 2}

        set d [::acs::test::form_reply  -last_request $d  -form $form  -update [subst {
                       folder_name "$folder_name"
                       description "$folder_description"
                   }]]
        acs::test::reply_has_status_code $d 302
        set location [::acs::test::get_url_from_location $d]

        if { [string match  "*/\?folder_id*" $location] } {
            set d [acs::test::http -last_request $d $location]
            acs::test::reply_contains $d $folder_name
        } else {
            aa_error "file_storage::test::create_new_folder failed, bad response url : $location"
        }

        return $d
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: