[Http-webtest-commits] HTTP-WebTest/t 10-click.t,1.6,1.7
Brought to you by:
m_ilya,
richardanderson
From: Ilya M. <m_...@us...> - 2002-08-20 20:57:54
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv21374/t Modified Files: 10-click.t Log Message: Updated Index: 10-click.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/10-click.t,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 10-click.t 27 Apr 2002 22:01:47 -0000 1.6 --- 10-click.t 20 Aug 2002 20:57:51 -0000 1.7 *************** *** 16,20 **** use vars qw($HOSTNAME $PORT $URL $TEST); ! BEGIN { plan tests => 7 } # init tests --- 16,20 ---- use vars qw($HOSTNAME $PORT $URL $TEST); ! BEGIN { plan tests => 9 } # init tests *************** *** 135,139 **** my $tests = [ { url => abs_url($URL, '/test4.html'), text_require => [ '<title>Test File 4</title>' ] }, ! # click button to submit form to /test1.txt { click_button => 'Button', method => 'get', --- 135,139 ---- my $tests = [ { url => abs_url($URL, '/test4.html'), text_require => [ '<title>Test File 4</title>' ] }, ! # click button to submit form to /show-request { click_button => 'Button', method => 'get', *************** *** 143,146 **** --- 143,147 ---- 'Content: <>' ], }, + # click button to submit form to /show-request { url => abs_url($URL, '/test4.html'), text_require => [ '<title>Test File 4</title>' ] }, *************** *** 159,162 **** --- 160,233 ---- opts => $OPTS, check_file => 't/test.out/click_button4'); + } + + # 8: test 'form_name' test parameter + { + my $tests = [ { url => abs_url($URL, '/test5.html'), + text_require => [ '<title>Test File 5</title>' ] }, + # click button to submit form to /show-request + { form_name => 'yy', + params => [ param1 => 'value1' ], + text_require => [ 'Method: <GET>', + 'Query: <param1=value1>', + 'Content: <>' ], + }, + { url => abs_url($URL, '/test5.html'), + text_require => [ '<title>Test File 5</title>' ] }, + # click button to submit form to /bad-request + { form_name => 'xx', + params => [ param1 => 'value1' ], + status_code => 404, + }, + ]; + + check_webtest(webtest => $WEBTEST, + server_url => $URL, + tests => $tests, + opts => $OPTS, + check_file => 't/test.out/form_name'); + } + + # 9: test 'click_button' with images + { + my $tests = [ { url => abs_url($URL, '/test6.html'), + text_require => [ '<title>Test File 6</title>' ] }, + # click button to submit form to /show-request + { click_button => 'Button2', + params => [ param1 => 'value1' ], + text_require => [ 'Method: <GET>', + 'Query: <param1=value1>', + 'Content: <>' ], + }, + { url => abs_url($URL, '/test6.html'), + text_require => [ '<title>Test File 6</title>' ] }, + # click button to submit form to /show-request + { click_button => 'y.gif', + params => [ param1 => 'value1' ], + text_require => [ 'Method: <GET>', + 'Query: <param1=value1>', + 'Content: <>' ], + }, + { url => abs_url($URL, '/test6.html'), + text_require => [ '<title>Test File 6</title>' ] }, + # click button to submit form to /bad-request + { click_button => 'Button1', + params => [ param1 => 'value1' ], + status_code => 404, + }, + { url => abs_url($URL, '/test6.html'), + text_require => [ '<title>Test File 6</title>' ] }, + # click button to submit form to /bad-request + { click_button => 'x.gif', + params => [ param1 => 'value1' ], + status_code => 404, + }, + ]; + + check_webtest(webtest => $WEBTEST, + server_url => $URL, + tests => $tests, + opts => $OPTS, + check_file => 't/test.out/click_button_image'); } |