| |
35 |
35 |
|
| |
36 |
36 |
tclwebtest::cookies clear |
| |
37 |
37 |
# Login user |
| |
38 |
38 |
array set user_info [twt::user::create -admin] |
| |
39 |
39 |
twt::user::login $user_info(email) $user_info(password) |
| |
40 |
40 |
|
| |
41 |
41 |
# Create a new Faq |
| |
42 |
42 |
set faq_name [ad_generate_random_string] |
| |
43 |
43 |
faq_portlet::twt::new $faq_name |
| |
44 |
44 |
|
| |
45 |
45 |
# Delete the faq |
| |
46 |
46 |
set response [faq_portlet::twt::delete $faq_name] |
| |
47 |
47 |
aa_display_result -response $response -explanation {Webtest for deleting a Faq} |
| |
48 |
48 |
|
| |
49 |
49 |
twt::user::logout |
| |
50 |
50 |
} |
| |
51 |
51 |
} |
| |
52 |
52 |
|
| |
53 |
53 |
aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_disable_faq_portlet { |
| |
54 |
54 |
|
| |
55 |
|
Testing the process of creating and disableing a Faq. |
| |
|
55 |
Testing the process of creating and disabling a Faq. |
| |
56 |
56 |
|
| |
57 |
57 |
} { |
| |
58 |
58 |
aa_run_with_teardown -test_code { |
| |
59 |
59 |
|
| |
60 |
60 |
tclwebtest::cookies clear |
| |
61 |
61 |
# Login user |
| |
62 |
62 |
array set user_info [twt::user::create -admin] |
| |
63 |
63 |
twt::user::login $user_info(email) $user_info(password) |
| |
64 |
64 |
|
| |
65 |
65 |
# Create new faq |
| |
66 |
66 |
set faq_name [ad_generate_random_string] |
| |
67 |
67 |
faq_portlet::twt::new $faq_name |
| |
68 |
68 |
|
| |
69 |
69 |
# Disable the Faq |
| |
70 |
70 |
set option "disable" |
| |
71 |
71 |
set response [faq_portlet::twt::disable_enable $faq_name $option] |
| |
72 |
72 |
aa_display_result -response $response -explanation {Webtest for disabling a Faq} |
| |
73 |
73 |
|
| |
74 |
74 |
twt::user::logout |
| |
75 |
75 |
} |
| |
76 |
76 |
} |
| |
77 |
77 |
|
| |
78 |
78 |
aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_enable_faq_portlet { |
| |
79 |
79 |
|
| |
80 |
|
Testing the process of creating, desableing and enableing Faq. |
| |
|
80 |
Testing the process of creating, disabling and enabling Faq. |
| |
81 |
81 |
|
| |
82 |
82 |
} { |
| |
83 |
83 |
aa_run_with_teardown -test_code { |
| |
84 |
84 |
|
| |
85 |
85 |
tclwebtest::cookies clear |
| |
86 |
86 |
# Login user |
| |
87 |
87 |
array set user_info [twt::user::create -admin] |
| |
88 |
88 |
twt::user::login $user_info(email) $user_info(password) |
| |
89 |
89 |
|
| |
90 |
90 |
# Create the Faq |
| |
91 |
91 |
set faq_name [ad_generate_random_string] |
| |
92 |
92 |
faq_portlet::twt::new $faq_name |
| |
93 |
93 |
|
| |
94 |
94 |
# Disable the faq |
| |
95 |
95 |
set option "disable" |
| |
96 |
96 |
faq_portlet::twt::disable_enable $faq_name $option |
| |
97 |
97 |
|
| |
98 |
98 |
# Enable the faq |
| |
99 |
99 |
set option "enable" |
| |
100 |
100 |
set response [faq_portlet::twt::disable_enable $faq_name $option] |