acs::test::login (public)

 acs::test::login user_info

Defined in packages/acs-automated-testing/tcl/aa-test-procs.tcl

Login (register operation) in a web session

Parameters:
user_info (required)
dict containing at least email, last_name, username and password

Partial Call Graph (max 5 caller/called nodes):
%3 test_webtest_example webtest_example (test acs-automated-testing) acs::test::login acs::test::login test_webtest_example->acs::test::login aa_log aa_log (public) acs::test::login->aa_log aa_test_start aa_test_start (public) acs::test::login->aa_test_start acs::test::form_get_fields acs::test::form_get_fields (public) acs::test::login->acs::test::form_get_fields acs::test::form_reply acs::test::form_reply (public) acs::test::login->acs::test::form_reply acs::test::form_set_fields acs::test::form_set_fields (public) acs::test::login->acs::test::form_set_fields acs::test::set_user acs::test::set_user (private) acs::test::set_user->acs::test::login

Testcases:
webtest_example
Source code:
        #aa_log "acs::test::login with user_info $user_info"
        set d [acs::test::http -user_id 0 /register/]
        acs::test::reply_has_status_code $d 200

        set form [acs::test::get_form [dict get $d body ] {//form[@id='login']}]
        set fields [acs::test::form_get_fields $form]
        if {[dict exists $fields email]} {
            aa_log "login via email [dict get $user_info email]"
            dict set fields email [dict get $user_info email]
        } else {
            aa_log "login via username [dict get $user_info username]"
            dict set fields username [dict get $user_info username]
        }
        dict set fields password [dict get $user_info password]
        set form [acs::test::form_set_fields $form $fields]

        set d [::acs::test::form_reply -user_id 0 -form $form]
    ns_log notice "::acs::test::form_reply $form -->\n$d"
        acs::test::reply_has_status_code $d 302
        aa_test_start

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