|
From: <jgr...@us...> - 2003-08-23 03:11:08
|
Update of /cvsroot/popfile/engine/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv11093/tests
Modified Files:
TestHTML.script TestHTML.tst
Log Message:
Test suite for HTML interface Configuration screen that verifies the connection between all the widgets and their corresponding configuration options
Index: TestHTML.script
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestHTML.script,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TestHTML.script 21 Aug 2003 13:58:18 -0000 1.4
--- TestHTML.script 21 Aug 2003 17:07:05 -0000 1.5
***************
*** 178,192 ****
# TODO Check magnet deletion
! # TODO Configuration Page
URL http://127.0.0.1:$port/configuration
GET
! # TODO Check skin change
! # TODO Check language change
! # TODO Check logger change
! # TODO Check history lines change
! # TODO Check history days change
! # TODO Check change timeout
# Check change POP3 port
--- 178,251 ----
# TODO Check magnet deletion
! # Configuration Page
URL http://127.0.0.1:$port/configuration
GET
! # Check skin change
!
! MATCH <link rel="stylesheet" type="text/css" href="skins/SimplyBlue.css" title="SimplyBlue">
! CONFIGIS html_skin SimplyBlue
! SETSUBMIT skin default
! MATCH <link rel="stylesheet" type="text/css" href="skins/default.css" title="default">
! CONFIGIS html_skin default
!
! # Check language change
!
! MATCH <html lang="en">
! CONFIGIS html_language English
! SETSUBMIT language Francais
! MATCH <html lang="fr">
! CONFIGIS html_language Francais
! SETSUBMIT language English
! MATCH <html lang="en">
! CONFIGIS html_language English
!
! # Check logger change
!
! INPUTIS debug 2
! CONFIGIS GLOBAL_debug 1
! SETSUBMIT debug 3
! INPUTIS debug 3
! CONFIGIS GLOBAL_debug 2
! SETSUBMIT debug 4
! INPUTIS debug 4
! CONFIGIS GLOBAL_debug 3
! SETSUBMIT debug 1
! INPUTIS debug 1
! CONFIGIS GLOBAL_debug 0
!
! # Check history lines change
!
! INPUTIS page_size 20
! CONFIGIS html_page_size 20
! SETSUBMIT page_size 30
! INPUTIS page_size 30
! CONFIGIS html_page_size 30
! SETSUBMIT page_size 0
! MATCH The page size must be a number between 1 and 1000
! INPUTIS page_size 30
!
! # Check history days change
!
! INPUTIS history_days 2
! CONFIGIS html_history_days 2
! SETSUBMIT history_days 3
! INPUTIS history_days 3
! CONFIGIS html_history_days 3
! SETSUBMIT history_days 0
! MATCH The number of days in the history must be a number between 1 and 366
! INPUTIS history_days 3
!
! # Check change timeout
!
! INPUTIS timeout 60
! CONFIGIS GLOBAL_timeout 60
! SETSUBMIT timeout 61
! INPUTIS timeout 61
! CONFIGIS GLOBAL_timeout 61
! SETSUBMIT timeout 0
! MATCH The TCP timeout must be a number between 10 and 300
! INPUTIS timeout 61
# Check change POP3 port
***************
*** 201,213 ****
INPUTIS pop3_port 111
! # TODO Check change separator
! # TODO Check Subject Line Modification
! # TODO Check XTC
! # TODO Check XPL
! # TODO Check XMLRPC port
! # TODO Check UI port
! INPUTIS ui_port $port
# TODO Check SMTP port
# TODO Check NNTP port
--- 260,326 ----
INPUTIS pop3_port 111
! # Check change separator
! INPUTIS pop3_separator :
! CONFIGIS pop3_separator :
! SETSUBMIT pop3_separator ;
! INPUTIS pop3_separator ;
! CONFIGIS pop3_separator ;
! SETSUBMIT pop3_separator gg
! MATCH The separator character must be a single character
! INPUTIS pop3_separator ;
!
! # Check Subject Line Modification
!
! INPUTIS subject 1
! CONFIGIS GLOBAL_subject 1
! SETSUBMIT subject 1
! INPUTIS subject 2
! CONFIGIS GLOBAL_subject 0
!
! URL http://127.0.0.1:$port/buckets
! GET
! MATCH Disabled globally
!
! URL http://127.0.0.1:$port/configuration
! GET
! SETSUBMIT subject 2
! INPUTIS subject 1
! CONFIGIS GLOBAL_subject 1
!
! # Check XTC
!
! INPUTIS xtc 1
! CONFIGIS GLOBAL_xtc 1
! SETSUBMIT xtc 1
! INPUTIS xtc 2
! CONFIGIS GLOBAL_xtc 0
! SETSUBMIT xtc 2
! INPUTIS xtc 1
! CONFIGIS GLOBAL_xtc 1
!
! # Check XPL
+ INPUTIS xpl 1
+ CONFIGIS GLOBAL_xpl 1
+ SETSUBMIT xpl 1
+ INPUTIS xpl 2
+ CONFIGIS GLOBAL_xpl 0
+ SETSUBMIT xpl 2
+ INPUTIS xpl 1
+ CONFIGIS GLOBAL_xpl 1
+
+ # Check UI port
+
+ INPUTIS ui_port $port
+ CONFIGIS html_port $port
+ SETSUBMIT ui_port 8081
+ INPUTIS ui_port 8081
+ CONFIGIS html_port 8081
+ SETSUBMIT ui_port 0
+ MATCH The user interface port must be a number between 1 and 65535
+ INPUTIS ui_port 8081
+
+ # TODO Check XMLRPC port
# TODO Check SMTP port
# TODO Check NNTP port
Index: TestHTML.tst
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestHTML.tst,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** TestHTML.tst 21 Aug 2003 13:58:18 -0000 1.8
--- TestHTML.tst 21 Aug 2003 17:07:05 -0000 1.9
***************
*** 150,153 ****
--- 150,154 ----
$b->initialize();
+ test_assert( $b->start() );
my $p = new Proxy::POP3;
***************
*** 233,236 ****
--- 234,238 ----
my $ua = new LWP::UserAgent;
+ my $line_number = 0;
our $url;
***************
*** 241,244 ****
--- 243,247 ----
while ( my $line = <SCRIPT> ) {
+ $line_number += 1;
$line =~ s/^[\t ]+//g;
$line =~ s/[\r\n\t ]+$//g;
***************
*** 259,269 ****
print $dwriter "__GETCONFIG $option\n";
my $reply = <$ureader>;
! test_assert( $reply =~ /OK (.+)/ );
! test_assert_equal( $1, $expected );
next;
}
if ( $line =~ /^INPUTIS +([^ ]+) (.+)$/ ) {
! test_assert_equal( form_input( $1 ), $2 );
next;
}
--- 262,272 ----
print $dwriter "__GETCONFIG $option\n";
my $reply = <$ureader>;
! $reply =~ /^OK (.+)$/;
! test_assert_equal( $1, $expected, "From script line $line_number" );
next;
}
if ( $line =~ /^INPUTIS +([^ ]+) (.+)$/ ) {
! test_assert_equal( form_input( $1 ), $2, "From script line $line_number" );
next;
}
***************
*** 293,297 ****
if ( $line =~ /^MATCH +(.+)$/ ) {
! test_assert_regexp( $content, "\Q$1\E" );
next;
}
--- 296,300 ----
if ( $line =~ /^MATCH +(.+)$/ ) {
! test_assert_regexp( $content, "\Q$1\E", "From script line $line_number" );
next;
}
***************
*** 301,304 ****
--- 304,308 ----
while ( $line = <SCRIPT> ) {
+ $line_number += 1;
$line =~ s/^[\t ]+//g;
$line =~ s/[\r\n\t ]+$//g;
***************
*** 314,318 ****
}
! test_assert_regexp( $content, "\Q$block\E" );
next;
}
--- 318,322 ----
}
! test_assert_regexp( $content, "\Q$block\E", "From script line $line_number" );
next;
}
***************
*** 322,325 ****
--- 326,330 ----
while ( $line = <SCRIPT> ) {
+ $line_number += 1;
$line =~ s/^[\t ]+//g;
$line =~ s/[\r\n\t ]+$//g;
|