Index: openacs-4/packages/assessment/tcl/test/twt-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/test/twt-procs.tcl,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/assessment/tcl/test/twt-procs.tcl 15 Sep 2022 11:09:21 -0000 1.6.2.2 +++ openacs-4/packages/assessment/tcl/test/twt-procs.tcl 15 Sep 2022 11:10:02 -0000 1.6.2.3 @@ -9,8 +9,8 @@ aa_log "::tclwebtest::init not found. Skipping this test case." return } - -::tclwebtest::init + + ::tclwebtest::init set assessment_name "__test [ns_mktemp XXXXXX]" set assessment_url "__test_[ns_mktemp XXXXXX]" aa_log "Assessment url = '${assessment_url}'" @@ -27,52 +27,52 @@ ::tclwebtest::do_request "/${assessment_url}/asm-admin/" ::tclwebtest::link follow {New Assessment} ;# ~u {/${assessment_url}/asm-admin/assessment-form?type=test} ::tclwebtest::form find ~n {assessment_form} - ::tclwebtest::field fill $assessment_name ;# ~n {title} ;# type of field = text - ::tclwebtest::field fill {} ;# ~n {description} ;# type of field = textarea -::tclwebtest::form submit + ::tclwebtest::field fill $assessment_name ;# ~n {title} ;# type of field = text + ::tclwebtest::field fill {} ;# ~n {description} ;# type of field = textarea + ::tclwebtest::form submit ::tclwebtest::link follow {Questions} ;# ~u {/${assessment_url}/asm-admin/one-section?section%5fid=727724&assessment%5fid=727720} ::tclwebtest::link follow {Add a new question} ;# ~u {/${assessment_url}/asm-admin/item-add?section_id=727724&assessment_id=727720&after=0} ::tclwebtest::form find ~n {item-add} set question_text [string repeat X 100] - ::tclwebtest::field fill $question_text ~n {question_text} ;# type of field = textarea + ::tclwebtest::field fill $question_text ~n {question_text} ;# type of field = textarea ::tclwebtest::field select -index 0 ;# ~n {required_p} ;# selected - ::tclwebtest::field fill {} ~n {feedback_wrong} ;# type of field = textarea - ::tclwebtest::field fill {} ~n {points} ;# type of field = text + ::tclwebtest::field fill {} ~n {feedback_wrong} ;# type of field = textarea + ::tclwebtest::field fill {} ~n {points} ;# type of field = text ::tclwebtest::field select -index 2 ~n {item_type} - ::tclwebtest::field fill {} ;# ~n {reference_answer} ;# type of field = textarea + ::tclwebtest::field fill {} ;# ~n {reference_answer} ;# type of field = textarea - ::tclwebtest::form submit {formbutton_ok} + ::tclwebtest::form submit {formbutton_ok} ns_log notice "[::tclwebtest::response text]" ::tclwebtest::assert text $question_text - aa_log "Added One Question" + aa_log "Added One Question" ::tclwebtest::link follow ~u {one-a} ;# ~u {/${assessment_url}/asm-admin/one-a?assessment%5fid=727720} ::tclwebtest::link follow {Change status} ;# ~u {/${assessment_url}/asm-admin/toggle-publish?assessment_id=727720} - aa_log "Made Live" + aa_log "Made Live" -# twt::user::login $user(email) $user(password) $user(username) + # twt::user::login $user(email) $user(password) $user(username) twt::do_request "/${assessment_url}/" ::tclwebtest::link follow $assessment_name ;# ~u {/${assessment_url}/assessment?assessment%5fid=727720} ::tclwebtest::link follow Start ::tclwebtest::form find ~n {show_item_form} - ::tclwebtest::field fill {{}[]} ;# ~n {response_to_item.727726} ;# type of field = text -::tclwebtest::form submit + ::tclwebtest::field fill {{}[]} ;# ~n {response_to_item.727726} ;# type of field = text + ::tclwebtest::form submit ::tclwebtest::link follow ~u {session} ;# ~u {/${assessment_url}/session?session_id=727735} -# twt::user::login $admin_user(email) $admin_user(password) $admin_user(username) + # twt::user::login $admin_user(email) $admin_user(password) $admin_user(username) twt::do_request "/${assessment_url}/asm-admin" -# ns_log notice "[::tclwebtest::link all]" - ::tclwebtest::link follow $assessment_name ;# ~u {/${assessment_url}/asm-admin/one-a?assessment%5fid=727720} + # ns_log notice "[::tclwebtest::link all]" + ::tclwebtest::link follow $assessment_name ;# ~u {/${assessment_url}/asm-admin/one-a?assessment%5fid=727720} ::tclwebtest::link follow {Delete this assessment} ;# ~u {/${assessment_url}/asm-admin/assessment-delete?assessment_id=727720} ::tclwebtest::form find ~n {assessment_delete_confirm} ::tclwebtest::field select -index 0 ;# ~n {confirmation} -::tclwebtest::form submit - + ::tclwebtest::form submit + # unmount and uninstantiate apm_package_instance_delete $assessment_package_id - - catch {acs::test::user::delete -user_id $user(user_id)} errmsg + + catch {acs::test::user::delete -user_id $user(user_id)} errmsg aa_log $errmsg catch {acs::test::user::delete -user_id $admin_user(user_id)} errmsg aa_log $errmsg