From 004280c137305d00ede218b40930882f5b765886 Mon Sep 17 00:00:00 2001 From: Thomas Kasulke Date: Thu, 30 Aug 2007 12:52:34 +0000 Subject: [PATCH] =?utf8?q?Angepasst=20an=20Einzelfalltests=20und=20einf?= =?utf8?q?=C3=BCgen=20von=20TODO=20Blocks,=20damit=20bei=20der=20n=C3=A4ch?= =?utf8?q?sten=20Selenium=20Version=20dann=20komplett=20getestet=20werden?= =?utf8?q?=20kann.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- t/lx-office.t | 99 +++-- t/selenium/AllTests.t | 20 +- .../begin/A001CreateTestDatabase.t | 11 +- .../administration/begin/A002CreateTestUser.t | 9 +- .../administration/begin/A003UpdateDatabase.t | 5 + .../administration/end/A998DeleteTestUser.t | 7 + .../end/A999DeleteTestDatabase.t | 8 +- t/selenium/testscripts/base/000Login.t | 11 +- t/selenium/testscripts/base/999Logout.t | 10 +- .../masterdata/begin/M001CreateCustomer.t | 10 +- .../masterdata/begin/M002CreateVendor.t | 7 +- .../masterdata/begin/M003CreateGoods.t | 6 + .../masterdata/begin/M004AddService.t | 8 +- .../masterdata/begin/M005AddProduct.t | 8 +- .../masterdata/begin/M006AddProject.t | 11 +- .../masterdata/end/M995DeleteGoods.t | 20 + .../masterdata/end/M996DeleteProject.t | 28 ++ .../masterdata/end/M997DeleteService.t | 31 ++ .../masterdata/end/M998DeleteProduct.t | 34 ++ .../purchase/begin/P001CreateQuoteRequest.t | 40 ++ .../selling/begin/S001CreateOffers.t | 69 +++ .../selling/begin/S002CreateCharge.t | 81 ++++ .../selling/begin/S003CreateInvoice.t | 31 ++ .../system/begin/S001CreateProductGroups.t | 8 +- .../system/begin/S002CreatePriceBrackets.t | 7 +- .../system/begin/S003AddLanguage.t | 5 + .../system/begin/S004ShowLanguages.t | 6 + .../system/begin/S005AddPaymentConditions.t | 6 + .../system/begin/S006ShowPaymentConditions.t | 8 +- .../system/begin/S007AddCustomerVendorTypes.t | 6 + .../begin/S008ShowCustomerVendorTypes.t | 6 + .../system/begin/S009AddShowDeleteMeasure.t | 7 +- .../begin/S010AddShowDeleteServiceMeasure.t | 6 + .../system/begin/S011CreateAccount.t | 39 ++ .../system/begin/S012ShowAccount.t | 395 ++++++++++++++++++ .../system/begin/S013TestAccount.t | 31 ++ .../system/end/S992DeleteProductGroups.t | 51 ++- .../system/end/S994DeleteAccount.t | 19 + .../end/S995DeleteCustomerVendorTypes.t | 6 + .../system/end/S996DeletePaymentConditions.t | 6 + .../system/end/S997DeleteLanguages.t | 6 + .../system/end/S998DeletePriceBrackets.t | 43 +- 42 files changed, 1122 insertions(+), 103 deletions(-) create mode 100644 t/selenium/testscripts/masterdata/end/M995DeleteGoods.t create mode 100644 t/selenium/testscripts/masterdata/end/M996DeleteProject.t create mode 100644 t/selenium/testscripts/masterdata/end/M997DeleteService.t create mode 100644 t/selenium/testscripts/masterdata/end/M998DeleteProduct.t create mode 100644 t/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t create mode 100644 t/selenium/testscripts/selling/begin/S001CreateOffers.t create mode 100644 t/selenium/testscripts/selling/begin/S002CreateCharge.t create mode 100644 t/selenium/testscripts/selling/begin/S003CreateInvoice.t create mode 100644 t/selenium/testscripts/system/begin/S011CreateAccount.t create mode 100644 t/selenium/testscripts/system/begin/S012ShowAccount.t create mode 100644 t/selenium/testscripts/system/begin/S013TestAccount.t create mode 100644 t/selenium/testscripts/system/end/S994DeleteAccount.t diff --git a/t/lx-office.t b/t/lx-office.t index 6925930b6..0b583e1c3 100644 --- a/t/lx-office.t +++ b/t/lx-office.t @@ -46,7 +46,8 @@ "printing" => 't/selenium/TestPrinting.t', "programm" => 't/selenium/TestProgramm.t', "reports" => 't/selenium/TestReports.t' ); - my $testonly = 0; + my $showtests = 0; + my $singletest = 0; my $nodb = 0; my @totest; @@ -71,8 +72,10 @@ print "\t\t -admin\tonly runs testscripts for \"administration\"\n"; print "\t\t -testbed\tcreates a standardized test database\n"; print "\t\t -nodb\t\tdoesn't create a db! Only use with \n\t\t\t\t--username, --userpasswd, --dbname, --dbport, --dbhost, --dbuser, --dbpasswd, --rootpasswd arguments!\n"; - print "\t\t -testsonly\tfinally shows all tests available only\n"; + print "\t\t -showtests\tfinally shows all tests available only\n"; + print "\t\t -singletest\toption flag for using single tests shown in \"-showtests\"\n"; printf "\n\t\targuments:\n\t\t%s\n","\xAF" x 10; + print "\t\t --test=\tname of Test shown in showtests seperated by , (Only joined by -singletest)\n"; print "\t\t --username=\tuser login name\n"; print "\t\t --userpasswd=\tuser login password\n"; print "\t\t --dbname=\tname of used db (leave empty whether dbname is seleniumtestdatabase)\n"; @@ -90,30 +93,38 @@ $_ = $ARGV[0]; if ( /^--help$/ ) { usage; last } - if ( /^-testonly$/) { $testonly = 1; shift; next } - if ( /^-nodb$/ ) { $nodb = 1; shift; next } - if ( /^-(masterdata)$/ ) { push @totest, $1; shift; next } - if ( /^-(system)$/ ) { push @totest, $1; shift; next } - if ( /^-(selling)$/ ) { push @totest, $1; shift; next } - if ( /^-(purchase)$/ ) { push @totest, $1; shift; next } - if ( /^-(testbed)$/ ) { push @totest, $1; shift; next } - if ( /^-(admin)$/ ) { push @totest, $1; shift; next } - if ( /^--username=(.*)$/ ) { $lxtest{testuserlogin} = $1; shift; next } - if ( /^--userpasswd=(.*)$/ ) { $lxtest{testuserpasswd} = $1; shift; next } - if ( /^--dbname=(.*)$/ ) { $lxtest{db} = $1; shift; next } - if ( /^--dbport=(.*)$/ ) { $lxtest{dbport} = $1; shift; next } - if ( /^--dbhost=(.*)$/ ) { $lxtest{dbhost} = $1; shift; next } - if ( /^--dbuser=(.*)$/ ) { $lxtest{dbuser} = $1; shift; next } - if ( /^--dbpasswd=(.*)$/ ) { $lxtest{dbpasswd} = $1; shift; next } - if ( /^--rootpasswd=(.*)$/ ) { $lxtest{rpw} = $1; shift; next } - if ( /^([A-Z].*)$/ ) { push @totest, shift; next } - if ( /^-/ ) { + elsif ( /^-showtests$/) { $showtests = 1; shift; next } + elsif ( /^-nodb$/ ) { $nodb = 1; shift; next } + elsif ( /^-(masterdata)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(system)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(selling)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(purchase)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(testbed)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(payments)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(admin)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(printing)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(reports)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(accounting)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(purchase)$/ ) { push @totest, $1; shift; next } + elsif ( /^-(programm)$/ ) { push @totest, $1; shift; next } + elsif ( /^-singletest$/ ) { $singletest = 1; shift; next } + elsif ( /^--username=(.*)$/ ) { $lxtest{testuserlogin} = $1; shift; next } + elsif ( /^--userpasswd=(.*)$/ ) { $lxtest{testuserpasswd} = $1; shift; next } + elsif ( /^--dbname=(.*)$/ ) { $lxtest{db} = $1; shift; next } + elsif ( /^--dbport=(.*)$/ ) { $lxtest{dbport} = $1; shift; next } + elsif ( /^--dbhost=(.*)$/ ) { $lxtest{dbhost} = $1; shift; next } + elsif ( /^--dbuser=(.*)$/ ) { $lxtest{dbuser} = $1; shift; next } + elsif ( /^--dbpasswd=(.*)$/ ) { $lxtest{dbpasswd} = $1; shift; next } + elsif ( /^--rootpasswd=(.*)$/ ) { $lxtest{rpw} = $1; shift; next } + elsif ( /^--test=(.*)$/ ) { foreach (split(/\,/, $1)) { push @totest, $_; } shift; next } + elsif ( /^([A-Z].*)$/ ) { push @totest, shift; next } + else { print STDERR "$0: ERROR: unrecognized option '$_' ?\n"; usage; } last; } - + unlink("/tmp/lxtest-temp.conf") if (-f "/tmp/lxtest-temp.conf"); open TEMPCONF, "+>/tmp/lxtest-temp.conf"; print TEMPCONF '$lxtest = {'."\n"; foreach (keys(%lxtest)) { @@ -121,25 +132,26 @@ } print TEMPCONF '};'; close TEMPCONF; - - my $testscriptdir = 't/selenium/testscripts/'; - opendir(ROOT, $testscriptdir); - foreach my $dir ( readdir( ROOT ) ) { - if(-d $testscriptdir . $dir && $dir ne "begin" && $dir ne "end" && $dir ne "..") { - opendir(DIR, $testscriptdir . $dir . "/begin"); - foreach ( readdir(DIR) ) { - $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "begin/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ ); - } - closedir(DIR); - opendir(DIR, $testscriptdir . $dir . "/end"); - foreach (readdir(DIR)) { - $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "end/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ ); + + if($singletest || $showtests) { + my $testscriptdir = 't/selenium/testscripts/'; + opendir(ROOT, $testscriptdir); + foreach my $dir ( readdir( ROOT ) ) { + if(-d $testscriptdir . $dir && $dir ne "begin" && $dir ne "end" && $dir ne "..") { + opendir(DIR, $testscriptdir . $dir . "/begin"); + foreach ( readdir(DIR) ) { + $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "begin/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ ); + } + closedir(DIR); + opendir(DIR, $testscriptdir . $dir . "/end"); + foreach (readdir(DIR)) { + $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "end/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ ); + } + closedir(DIR); } - closedir(DIR); } + closedir(ROOT); } - closedir(ROOT); - push @totest, "all" if(!$totest[0]); @@ -149,13 +161,14 @@ ## Frontendtests: - - foreach (@totest) { - &runtests( - $tests{$_}, - ) if (!$testonly); + if (!$showtests) { + foreach (@totest) { + &runtests( + $tests{$_}, + ); + } } - if($testonly) { + elsif($showtests) { printf "\tFollowing testscripts are present:\n\t%s\n","\xAF" x 34;; foreach (sort(keys(%tests))) { print "\t\t" . $_ ."\n" if( /^[A-Z].*$/ ); diff --git a/t/selenium/AllTests.t b/t/selenium/AllTests.t index a6cca0704..8e6ee80f3 100644 --- a/t/selenium/AllTests.t +++ b/t/selenium/AllTests.t @@ -61,6 +61,11 @@ # plan tests => 200; # Need to be cutomized # } sub init_server { + my $singlefileonly = 0; + if ($_[0] eq "singlefileonly") { + $singlefileonly = 1; + shift; + } if(!server_is_running) { print "No selenium server found! " ."Maybe you forgot to start it or " @@ -108,12 +113,17 @@ diag('Starting Selenium tests...'); - foreach my $scriptdir (@_) { - opendir(SCRIPTS, 't/selenium/testscripts/' . $scriptdir); - foreach (sort readdir(SCRIPTS)) { - require_ok("t/selenium/testscripts/". $scriptdir . "/" . $_) if ( $_ =~ /^\w\d\d\d.*\.t$/); + if(!$singlefileonly) { + foreach my $scriptdir (@_) { + opendir(SCRIPTS, 't/selenium/testscripts/' . $scriptdir); + foreach (sort readdir(SCRIPTS)) { + require_ok("t/selenium/testscripts/". $scriptdir . "/" . $_) if ( $_ =~ /^\w\d\d\d.*\.t$/); + } + closedir(SCRIPTS); } - closedir(SCRIPTS); + } + else { + foreach (@_) { require_ok($_); } } if($!) { @! = ("Test fehlgeschlagen!"); diff --git a/t/selenium/testscripts/administration/begin/A001CreateTestDatabase.t b/t/selenium/testscripts/administration/begin/A001CreateTestDatabase.t index c45e1bc7f..7a568f0e8 100644 --- a/t/selenium/testscripts/administration/begin/A001CreateTestDatabase.t +++ b/t/selenium/testscripts/administration/begin/A001CreateTestDatabase.t @@ -1,5 +1,9 @@ ### Create Database - +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly", $0); + exit(0); +} $sel->open_ok($lxtest->{lxadmin}); if($sel->get_title() eq "") { @@ -11,7 +15,7 @@ if($sel->get_title() eq "") { $sel->title_is("Lx-Office ERP Administration -"); diag('Lock the system'); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); +$sel->click_ok("document.forms[0].action[3]"); # Button für System sperren $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->title_is("Lx-Office ERP Administration -"); @@ -38,6 +42,7 @@ $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->title_is("Lx-Office ERP Administration -"); diag('Unlock the system'); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); +$sel->click_ok("document.forms[0].action[3]"); # BUtton für System entsperren $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->title_is("Lx-Office ERP Administration -"); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/administration/begin/A002CreateTestUser.t b/t/selenium/testscripts/administration/begin/A002CreateTestUser.t index c9bbee6d0..58200e617 100644 --- a/t/selenium/testscripts/administration/begin/A002CreateTestUser.t +++ b/t/selenium/testscripts/administration/begin/A002CreateTestUser.t @@ -1,5 +1,11 @@ - ### Create new user + +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly", $0); + exit(0); +} + diag("Create test user '$lxtest->{testuserlogin}'"); $sel->open_ok($lxtest->{lxadmin}); @@ -31,3 +37,4 @@ $sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); $sel->click_ok("action"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->title_is("Lx-Office ERP Administration -"); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/administration/begin/A003UpdateDatabase.t b/t/selenium/testscripts/administration/begin/A003UpdateDatabase.t index af2016ce3..e835959ee 100644 --- a/t/selenium/testscripts/administration/begin/A003UpdateDatabase.t +++ b/t/selenium/testscripts/administration/begin/A003UpdateDatabase.t @@ -1,4 +1,9 @@ ### Update Database +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly", $0); + exit(0); +} # NOTEST: some preruns for initializing missing parameters $sel->open($lxtest->{lxadmin}); diff --git a/t/selenium/testscripts/administration/end/A998DeleteTestUser.t b/t/selenium/testscripts/administration/end/A998DeleteTestUser.t index 8fa1c5db9..45cb7d32c 100644 --- a/t/selenium/testscripts/administration/end/A998DeleteTestUser.t +++ b/t/selenium/testscripts/administration/end/A998DeleteTestUser.t @@ -1,4 +1,10 @@ ### Delete user +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} + diag("Delete test user '$lxtest->{testuserlogin}'"); $sel->open_ok($lxtest->{lxadmin}); @@ -8,3 +14,4 @@ $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->title_is("Lx-Office ERP Administration / Benutzerdaten bearbeiten -"); $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Löschen\")]"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/administration/end/A999DeleteTestDatabase.t b/t/selenium/testscripts/administration/end/A999DeleteTestDatabase.t index 6c8ce3f24..1051dfbd9 100644 --- a/t/selenium/testscripts/administration/end/A999DeleteTestDatabase.t +++ b/t/selenium/testscripts/administration/end/A999DeleteTestDatabase.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} $sel->open_ok($lxtest->{lxadmin}); @@ -31,4 +36,5 @@ $sel->title_is("Lx-Office ERP Administration -"); diag('Unlock the system'); $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office ERP Administration -"); \ No newline at end of file +$sel->title_is("Lx-Office ERP Administration -"); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/base/000Login.t b/t/selenium/testscripts/base/000Login.t index e8ec603f5..5dc1137e9 100644 --- a/t/selenium/testscripts/base/000Login.t +++ b/t/selenium/testscripts/base/000Login.t @@ -1,5 +1,11 @@ ### Login +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} + diag("Login"); $sel->open_ok($lxtest->{lxbaseurl}."/login.pl"); @@ -24,6 +30,7 @@ if($sel->get_title() eq "Datenbankaktualisierung - Lx-Office Version 2.4.3 - -") $sel->click_ok("//input[(\@type=\"submit\") and (\@value=\"Weiter\")]"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); } + +$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); - -$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); \ No newline at end of file +1; \ No newline at end of file diff --git a/t/selenium/testscripts/base/999Logout.t b/t/selenium/testscripts/base/999Logout.t index b49e0af79..03c90d72d 100644 --- a/t/selenium/testscripts/base/999Logout.t +++ b/t/selenium/testscripts/base/999Logout.t @@ -1,8 +1,14 @@ ### Logout -diag("Logout"); +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly", "t/selenium/testscripts/base/000Login.t", $0); + exit(0); +} +diag("Logout"); $sel->select_frame_ok("relative=top"); $sel->click_ok("link=abmelden"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->title_is("Lx-Office Version ".$lxtest->{version}); \ No newline at end of file +$sel->title_is("Lx-Office Version ".$lxtest->{version}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M001CreateCustomer.t b/t/selenium/testscripts/masterdata/begin/M001CreateCustomer.t index 8809c6d3c..de27c4235 100644 --- a/t/selenium/testscripts/masterdata/begin/M001CreateCustomer.t +++ b/t/selenium/testscripts/masterdata/begin/M001CreateCustomer.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Create first Customer"); if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ @@ -19,7 +24,7 @@ $sel->type_ok("street", "Grummelburger 111"); $sel->type_ok("zipcode", "37115"); $sel->type_ok("city", "Musterstadt"); $sel->type_ok("country", "Germany"); -$sel->type_ok("creditlimit", "100"); +$sel->type_ok("creditlimit", "10000000"); $sel->type_ok("discount", "5"); $sel->type_ok("account_number", "1"); $sel->select_ok("salesman_id", "label=Selenium"); @@ -71,6 +76,7 @@ $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->select_frame_ok("main_window"); $sel->click_ok("link=Rechnungsadresse"); $sel->click_ok("customernumber"); +$sel->type_ok("creditlimit", "10000000"); $sel->type_ok("customernumber", "2"); $sel->click_ok("greeting"); $sel->type_ok("greeting", "Herr"); @@ -92,6 +98,7 @@ $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->select_frame_ok("main_window"); $sel->click_ok("customernumber"); $sel->type_ok("customernumber", "3"); +$sel->type_ok("creditlimit", "10000000"); $sel->click_ok("greeting"); $sel->type_ok("greeting", "Frau"); $sel->type_ok("name", "TestFrau3"); @@ -104,3 +111,4 @@ $sel->type_ok("city", "Brunnenberge"); $sel->type_ok("country", "Austria"); $sel->click_ok("document.ct.action[1]"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M002CreateVendor.t b/t/selenium/testscripts/masterdata/begin/M002CreateVendor.t index 9cf41e167..3bace6178 100644 --- a/t/selenium/testscripts/masterdata/begin/M002CreateVendor.t +++ b/t/selenium/testscripts/masterdata/begin/M002CreateVendor.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Create vendor"); if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ @@ -118,4 +123,4 @@ $sel->type_ok("cp_birthday", "14.05.1971"); $sel->click_ok("link=Lieferungen"); $sel->click_ok("document.ct.action[1]"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - +1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M003CreateGoods.t b/t/selenium/testscripts/masterdata/begin/M003CreateGoods.t index 29ac98103..ef4f65f05 100644 --- a/t/selenium/testscripts/masterdata/begin/M003CreateGoods.t +++ b/t/selenium/testscripts/masterdata/begin/M003CreateGoods.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Create goods"); if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ @@ -62,3 +67,4 @@ $sel->click_ok("action"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->click_ok("document.ic.action[1]"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M004AddService.t b/t/selenium/testscripts/masterdata/begin/M004AddService.t index f94e4eb95..5dad1f6ae 100644 --- a/t/selenium/testscripts/masterdata/begin/M004AddService.t +++ b/t/selenium/testscripts/masterdata/begin/M004AddService.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Add service"); if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ @@ -38,4 +43,5 @@ $sel->type_ok("price_1", "0,02"); $sel->type_ok("price_2", "0,1"); $sel->type_ok("price_1", "0,1"); $sel->click_ok("document.ic.action[1]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); \ No newline at end of file +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M005AddProduct.t b/t/selenium/testscripts/masterdata/begin/M005AddProduct.t index 837965db6..19c4a13e3 100644 --- a/t/selenium/testscripts/masterdata/begin/M005AddProduct.t +++ b/t/selenium/testscripts/masterdata/begin/M005AddProduct.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Add product"); if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ @@ -29,4 +34,5 @@ $sel->type_ok("model_1", "standard"); $sel->click_ok("action"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->click_ok("document.ic.action[1]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); \ No newline at end of file +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/begin/M006AddProject.t b/t/selenium/testscripts/masterdata/begin/M006AddProject.t index 08af6bc10..85fe14912 100644 --- a/t/selenium/testscripts/masterdata/begin/M006AddProject.t +++ b/t/selenium/testscripts/masterdata/begin/M006AddProject.t @@ -1,4 +1,10 @@ -diag("Add product"); +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} + +diag("Add project"); if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ require_ok("../../begin/B004Login.t"); @@ -12,4 +18,5 @@ $sel->select_frame_ok("main_window"); $sel->type_ok("projectnumber", "1001"); $sel->type_ok("description", "tausend und eine Nacht"); $sel->click_ok("action"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); \ No newline at end of file +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/end/M995DeleteGoods.t b/t/selenium/testscripts/masterdata/end/M995DeleteGoods.t new file mode 100644 index 000000000..a2a8007c3 --- /dev/null +++ b/t/selenium/testscripts/masterdata/end/M995DeleteGoods.t @@ -0,0 +1,20 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete good"); + +if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ + require_ok("M000Login.t"); +} + +$sel->select_frame_ok("relative=up"); +$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); +$sel->click_ok("link=Erzeugnisse"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); + +# an dieser Stelle muss noch überleegt werdne, wie der Zusaamenhang zwischen Lagerbestand und "Löschen" vernünftigt gehandhabt werdne kann + +1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/end/M996DeleteProject.t b/t/selenium/testscripts/masterdata/end/M996DeleteProject.t new file mode 100644 index 000000000..11cc6815f --- /dev/null +++ b/t/selenium/testscripts/masterdata/end/M996DeleteProject.t @@ -0,0 +1,28 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete project"); + +if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ + require_ok("M000Login.t"); +} + +$sel->select_frame_ok("relative=up"); +$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); +$sel->click_ok("link=Projekte"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->text_is("link=1001", "1001"); +$sel->click_ok("link=1001"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +TODO: { + local $TODO= "Benutzte Projekte können nicht gelöscht werden!"; + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +} + +1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/end/M997DeleteService.t b/t/selenium/testscripts/masterdata/end/M997DeleteService.t new file mode 100644 index 000000000..7ceb81495 --- /dev/null +++ b/t/selenium/testscripts/masterdata/end/M997DeleteService.t @@ -0,0 +1,31 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete service"); + +if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ + require_ok("M000Login.t"); +} + +$sel->select_frame_ok("relative=up"); +$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); +$sel->click_ok("link=Dienstleistungen"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->text_is("link=999", "999"); +$sel->text_is("link=998", "998"); +$sel->text_is("link=Programmierstunde", "Programmierstunde"); +$sel->text_is("link=Telefonstunde", "Telefonstunde"); +$sel->click_ok("link=999"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.ic.action[3]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("link=Telefonstunde"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.ic.action[3]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/masterdata/end/M998DeleteProduct.t b/t/selenium/testscripts/masterdata/end/M998DeleteProduct.t new file mode 100644 index 000000000..40d3bb621 --- /dev/null +++ b/t/selenium/testscripts/masterdata/end/M998DeleteProduct.t @@ -0,0 +1,34 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete product"); + +if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ + require_ok("M000Login.t"); +} + +$sel->select_frame_ok("relative=up"); +$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); +$sel->click_ok("link=Waren"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->text_is("link=TestWare1", "TestWare1"); +$sel->text_is("link=TestWareSelenium2", "TestWareSelenium2"); +$sel->text_is("link=1", "1"); +$sel->text_is("link=2", "2"); +TODO: { + local $TODO = "Waren in Rechnungen können nicht gelöscht werden!"; + $sel->click_ok("link=1"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.ic.action[3]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=TestWareSelenium2"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.ic.action[3]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +} +1; \ No newline at end of file diff --git a/t/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t b/t/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t new file mode 100644 index 000000000..aafc82c86 --- /dev/null +++ b/t/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t @@ -0,0 +1,40 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create quote request"); + +$sel->select_frame_ok("relative=up"); +$sel->click_ok("link=Neue Preisanfrage"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->click_ok("partnumber_1"); +$sel->type_ok("partnumber_1", "1"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("quonumber"); +$sel->type_ok("quonumber", "1"); +$sel->click_ok("cp_id"); +$sel->select_ok("cp_id", "label=Baumann von Clausen (Vertrieb)"); +$sel->click_ok("//option[\@value='905']"); +$sel->click_ok("shipto_id"); +$sel->click_ok("shipto_id"); +$sel->click_ok("taxzone_id"); +$sel->click_ok("taxzone_id"); +$sel->click_ok("cb_show_details"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("payment_id"); +$sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); +$sel->click_ok("//option[\@value='886']"); +$sel->click_ok("//tr[5]/td/table/tbody/tr/td[3]"); +$sel->click_ok("taxincluded"); +$sel->click_ok("qty_1"); +$sel->type_ok("qty_1", "21"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.oe.action[6]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/selling/begin/S001CreateOffers.t b/t/selenium/testscripts/selling/begin/S001CreateOffers.t new file mode 100644 index 000000000..d4c2fbf95 --- /dev/null +++ b/t/selenium/testscripts/selling/begin/S001CreateOffers.t @@ -0,0 +1,69 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create offers"); + +$sel->select_frame_ok("relative=up"); +$sel->click_ok("link=Angebot erfassen"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)"); +$sel->select_ok("customer", "label=TestFrau3"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_ok("customer", "label=Selenium-Testfirma1"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)"); +$sel->type_ok("shipvia", "per pedes"); +$sel->type_ok("transaction_description", "alpha"); +$sel->type_ok("quonumber", "1"); +$sel->select_ok("globalproject_id", "label=1001"); +$sel->click_ok("cb_show_details"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("partnumber_1", "1"); +TODO: { + local $TODO = "Popups werden von Selenium noch nicht unterstützt!"; + $sel->click_ok("//button[\@type='button']"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +} +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.oe.action[5]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.oe.action[6]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_ok("customer", "label=TestFrau3"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("partnumber_1", "991"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("qty_1", "5"); +$sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("taxincluded"); +$sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.oe.action[6]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_ok("customer", "label=TestMann2"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("partnumber_1", "1"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1"); +$sel->type_ok("qty_1", "19"); +$sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.oe.action[6]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/selling/begin/S002CreateCharge.t b/t/selenium/testscripts/selling/begin/S002CreateCharge.t new file mode 100644 index 000000000..334b2df22 --- /dev/null +++ b/t/selenium/testscripts/selling/begin/S002CreateCharge.t @@ -0,0 +1,81 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create charge"); + +$sel->select_frame_ok("relative=up"); +$sel->click_ok("link=Auftrag erfassen"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)"); +$sel->type_ok("shippingpoint", "Braunschweig"); +$sel->type_ok("shipvia", "LKW"); +$sel->type_ok("transaction_description", "beta"); +$sel->click_ok("delivered"); +$sel->type_ok("ordnumber", "1"); +$sel->type_ok("quonumber", "1"); +$sel->type_ok("cusordnumber", "97862"); +$sel->select_ok("globalproject_id", "label=1001"); +$sel->type_ok("partnumber_1", "1"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("ship_1", "20"); +$sel->type_ok("qty_1", "20"); +$sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.oe.action[6]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_ok("customer", "label=TestFrau3"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("shippingpoint", "Göttingen"); +$sel->type_ok("shipvia", "PKW"); +$sel->type_ok("transaction_description", "teta"); +$sel->type_ok("ordnumber", "2"); +$sel->type_ok("quonumber", "2"); +$sel->type_ok("cusordnumber", "23453666"); +$sel->type_ok("partnumber_1", "911"); +$sel->type_ok("ship_1", "5"); +$sel->type_ok("qty_1", "5"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("description", "Handykarten D2"); +$sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe3"); +$sel->type_ok("listprice", "10,00"); +$sel->type_ok("sellprice", "20,00"); +$sel->type_ok("lastcost", "5,00"); +$sel->select_ok("price_factor_id", "label=pro 10"); +$sel->select_ok("unit", "label=Stck"); +$sel->type_ok("bin", "911"); +$sel->click_ok("not_discountable"); +$sel->click_ok("shop"); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.ic.action[1]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.oe.action[6]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_ok("customer", "label=TestMann2"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("partnumber_1", "991"); +$sel->type_ok("ship_1", "10"); +$sel->type_ok("qty_1", "10"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_ok("price_factor_id_1", "label=pro 10"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("sellprice_1", "1000"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.oe.action[6]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); \ No newline at end of file diff --git a/t/selenium/testscripts/selling/begin/S003CreateInvoice.t b/t/selenium/testscripts/selling/begin/S003CreateInvoice.t new file mode 100644 index 000000000..2eb219c1c --- /dev/null +++ b/t/selenium/testscripts/selling/begin/S003CreateInvoice.t @@ -0,0 +1,31 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create invoice"); + +$sel->select_frame_ok("relative=up"); +$sel->click_ok("link=Rechnung erfassen"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->select_ok("customer", "label=TestFrau3"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("partnumber_1", "1"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("partnumber_2", "991"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->type_ok("invnumber", "1"); +$sel->click_ok("trigger3"); +$sel->click_ok("trigger_orddate"); +$sel->type_ok("quonumber", "2"); +$sel->click_ok("trigger_quodate"); +$sel->select_ok("payment_id", "label=Schnellzahler/Skonto"); +$sel->click_ok("update_button"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->click_ok("document.invoice.action[6]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S001CreateProductGroups.t b/t/selenium/testscripts/system/begin/S001CreateProductGroups.t index 75a40e733..8c3e6df6e 100644 --- a/t/selenium/testscripts/system/begin/S001CreateProductGroups.t +++ b/t/selenium/testscripts/system/begin/S001CreateProductGroups.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Create product groups"); $sel->select_frame_ok("relative=up"); @@ -30,4 +35,5 @@ $sel->type_ok("partsgroup", "TestSeleniumWarengruppe3"); $sel->click_ok("action"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->click_ok("link=TestSeleniumWarengruppe3"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); \ No newline at end of file +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S002CreatePriceBrackets.t b/t/selenium/testscripts/system/begin/S002CreatePriceBrackets.t index c14180df3..fa9401ea2 100644 --- a/t/selenium/testscripts/system/begin/S002CreatePriceBrackets.t +++ b/t/selenium/testscripts/system/begin/S002CreatePriceBrackets.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Create price brackets"); $sel->select_frame_ok("relative=up"); @@ -11,4 +16,4 @@ $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->type_ok("pricegroup", "SeleniumTestPreisgruppe2"); $sel->click_ok("action","value=Speichern"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); - +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S003AddLanguage.t b/t/selenium/testscripts/system/begin/S003AddLanguage.t index 1ffd59965..8c2b7c9ea 100644 --- a/t/selenium/testscripts/system/begin/S003AddLanguage.t +++ b/t/selenium/testscripts/system/begin/S003AddLanguage.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Add languages"); $sel->select_frame_ok("relative=up"); diff --git a/t/selenium/testscripts/system/begin/S004ShowLanguages.t b/t/selenium/testscripts/system/begin/S004ShowLanguages.t index c64bc20eb..a5dbeed52 100644 --- a/t/selenium/testscripts/system/begin/S004ShowLanguages.t +++ b/t/selenium/testscripts/system/begin/S004ShowLanguages.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Show languages"); $sel->select_frame_ok("relative=up"); @@ -8,3 +13,4 @@ $sel->click_ok("link=elbisch"); $sel->wait_for_page_to_load($lxtest->{timeout}); $sel->click_ok("action"); $sel->wait_for_page_to_load($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S005AddPaymentConditions.t b/t/selenium/testscripts/system/begin/S005AddPaymentConditions.t index 0910598bd..91690f80f 100644 --- a/t/selenium/testscripts/system/begin/S005AddPaymentConditions.t +++ b/t/selenium/testscripts/system/begin/S005AddPaymentConditions.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Add payment conditions"); $sel->select_frame_ok("relative=up"); @@ -12,3 +17,4 @@ $sel->type_ok("percent_skonto", "3"); $sel->type_ok("terms_skonto", "97"); $sel->click_ok("action"); $sel->wait_for_page_to_load($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S006ShowPaymentConditions.t b/t/selenium/testscripts/system/begin/S006ShowPaymentConditions.t index 81c7081d5..0332d185d 100644 --- a/t/selenium/testscripts/system/begin/S006ShowPaymentConditions.t +++ b/t/selenium/testscripts/system/begin/S006ShowPaymentConditions.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Show payment conditions"); $sel->select_frame_ok("relative=up"); @@ -7,4 +12,5 @@ $sel->select_frame_ok("main_window"); $sel->click_ok("link=Schnellzahler/Skonto"); $sel->wait_for_page_to_load($lxtest->{timeout}); $sel->click_ok("action"); -$sel->wait_for_page_to_load($lxtest->{timeout}); \ No newline at end of file +$sel->wait_for_page_to_load($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t b/t/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t index 6cac12401..204aadc10 100644 --- a/t/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t +++ b/t/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Add customer/vendor types"); $sel->select_frame_ok("relative=up"); @@ -14,3 +19,4 @@ $sel->type_ok("description", "Kleink $sel->type_ok("customernumberinit", "200"); $sel->click_ok("action"); $sel->wait_for_page_to_load($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t b/t/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t index 9521eef76..af0e88cc0 100644 --- a/t/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t +++ b/t/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Show customer/vendor types"); $sel->select_frame_ok("relative=up"); @@ -13,3 +18,4 @@ $sel->click_ok("link=Kleink $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->click_ok("action"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t b/t/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t index 7d49e4c00..7dac06cf4 100644 --- a/t/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t +++ b/t/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Add show and delete measure"); $sel->select_frame_ok("relative=up"); @@ -40,4 +45,4 @@ $sel->wait_for_page_to_load($lxtest->{timeout}); $sel->click_ok("delete_8"); $sel->click_ok("document.forms[0].action[1]"); $sel->wait_for_page_to_load($lxtest->{timeout}); - +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t b/t/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t index 7159d0336..17181fe9e 100644 --- a/t/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t +++ b/t/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Add show and delete service measure"); $sel->select_frame_ok("relative=up"); @@ -19,3 +24,4 @@ $sel->wait_for_page_to_load($lxtest->{timeout}); $sel->click_ok("delete_5"); $sel->click_ok("document.forms[0].action[1]"); $sel->wait_for_page_to_load($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S011CreateAccount.t b/t/selenium/testscripts/system/begin/S011CreateAccount.t new file mode 100644 index 000000000..09985c382 --- /dev/null +++ b/t/selenium/testscripts/system/begin/S011CreateAccount.t @@ -0,0 +1,39 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Create Account"); + +$sel->select_frame_ok("relative=up"); +$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); +$sel->click_ok("link=Konto erfassen"); +$sel->wait_for_page_to_load($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->type_ok("accno", "000000000001"); +$sel->type_ok("description", "TestSeleniumKonto"); +$sel->select_ok("AccountType", "label=Aktiva/Mittelverwendung (A)"); +$sel->click_ok("AR"); +$sel->click_ok("AP"); +$sel->click_ok("IC"); +$sel->click_ok("AR_amount"); +$sel->click_ok("AR_paid"); +$sel->click_ok("AR_tax"); +$sel->click_ok("AP_amount"); +$sel->click_ok("AP_paid"); +$sel->click_ok("AP_tax"); +$sel->click_ok("IC_sale"); +$sel->click_ok("IC_cogs"); +$sel->click_ok("IC_taxpart"); +$sel->click_ok("IC_income"); +$sel->click_ok("IC_expense"); +$sel->click_ok("IC_taxservice"); +$sel->select_ok("pos_eur", "label=05. Ausserordentliche Erträge"); +$sel->select_ok("pos_bwa", "label=05. So.betr.Erlöse"); +$sel->select_ok("pos_bilanz", "label=02."); +$sel->click_ok("datevautomatik"); +$sel->click_ok("action"); +$sel->wait_for_page_to_load_ok("30000"); +$sel->is_element_present_ok("link=000000000001"); +$sel->is_text_present_ok("TestSeleniumKonto"); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S012ShowAccount.t b/t/selenium/testscripts/system/begin/S012ShowAccount.t new file mode 100644 index 000000000..3cbd2e668 --- /dev/null +++ b/t/selenium/testscripts/system/begin/S012ShowAccount.t @@ -0,0 +1,395 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Show Accounts"); + +$sel->select_frame_ok("relative=up"); +$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); +$sel->click_ok("link=Konten anzeigen"); +$sel->wait_for_page_to_load($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->title_is("Kontenübersicht - Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); +$sel->is_element_present_ok("link=000000000001"); +$sel->is_element_present_ok("link=0027"); +$sel->is_element_present_ok("link=0090"); +$sel->is_element_present_ok("link=0200"); +$sel->is_element_present_ok("link=0210"); +$sel->is_element_present_ok("link=0380"); +$sel->is_element_present_ok("link=0400"); +$sel->is_element_present_ok("link=0410"); +$sel->is_element_present_ok("link=0420"); +$sel->is_element_present_ok("link=0430"); +$sel->is_element_present_ok("link=0440"); +$sel->is_element_present_ok("link=0480"); +$sel->is_element_present_ok("link=0631"); +$sel->is_element_present_ok("link=0640"); +$sel->is_element_present_ok("link=0650"); +$sel->is_element_present_ok("link=0853"); +$sel->is_element_present_ok("link=1000"); +$sel->is_element_present_ok("link=1200"); +$sel->is_element_present_ok("link=1360"); +$sel->is_element_present_ok("link=1400"); +$sel->is_element_present_ok("link=1445"); +$sel->is_element_present_ok("link=1446"); +$sel->is_element_present_ok("link=1447"); +$sel->is_element_present_ok("link=1448"); +$sel->is_element_present_ok("link=1449"); +$sel->is_element_present_ok("link=1450"); +$sel->is_element_present_ok("link=1570"); +$sel->is_element_present_ok("link=1571"); +$sel->is_element_present_ok("link=1572"); +$sel->is_element_present_ok("link=1573"); +$sel->is_element_present_ok("link=1574"); +$sel->is_element_present_ok("link=1575"); +$sel->is_element_present_ok("link=1576"); +$sel->is_element_present_ok("link=1577"); +$sel->is_element_present_ok("link=1578"); +$sel->is_element_present_ok("link=1580"); +$sel->is_element_present_ok("link=1581"); +$sel->is_element_present_ok("link=1582"); +$sel->is_element_present_ok("link=1584"); +$sel->is_element_present_ok("link=1588"); +$sel->is_element_present_ok("link=1590"); +$sel->is_element_present_ok("link=1592"); +$sel->is_element_present_ok("link=1600"); +$sel->is_element_present_ok("link=1605"); +$sel->is_element_present_ok("link=1606"); +$sel->is_element_present_ok("link=1607"); +$sel->is_element_present_ok("link=1609"); +$sel->is_element_present_ok("link=1767"); +$sel->is_element_present_ok("link=1771"); +$sel->is_element_present_ok("link=1772"); +$sel->is_element_present_ok("link=1773"); +$sel->is_element_present_ok("link=1774"); +$sel->is_element_present_ok("link=1775"); +$sel->is_element_present_ok("link=1776"); +$sel->is_element_present_ok("link=1780"); +$sel->is_element_present_ok("link=1785"); +$sel->is_element_present_ok("link=1790"); +$sel->is_element_present_ok("link=1791"); +$sel->is_element_present_ok("link=1800"); +$sel->is_element_present_ok("link=1810"); +$sel->is_element_present_ok("link=1820"); +$sel->is_element_present_ok("link=1830"); +$sel->is_element_present_ok("link=1840"); +$sel->is_element_present_ok("link=1890"); +$sel->is_element_present_ok("link=2000"); +$sel->is_element_present_ok("link=2010"); +$sel->is_element_present_ok("link=2020"); +$sel->is_element_present_ok("link=2100"); +$sel->is_element_present_ok("link=2107"); +$sel->is_element_present_ok("link=2110"); +$sel->is_element_present_ok("link=2120"); +$sel->is_element_present_ok("link=2125"); +$sel->is_element_present_ok("link=2130"); +$sel->is_element_present_ok("link=2140"); +$sel->is_element_present_ok("link=2150"); +$sel->is_element_present_ok("link=2170"); +$sel->is_element_present_ok("link=2171"); +$sel->is_element_present_ok("link=2175"); +$sel->is_element_present_ok("link=2200"); +$sel->is_element_present_ok("link=2208"); +$sel->is_element_present_ok("link=2209"); +$sel->is_element_present_ok("link=2212"); +$sel->is_element_present_ok("link=2214"); +$sel->is_element_present_ok("link=2215"); +$sel->is_element_present_ok("link=2218"); +$sel->is_element_present_ok("link=2280"); +$sel->is_element_present_ok("link=2282"); +$sel->is_element_present_ok("link=2284"); +$sel->is_element_present_ok("link=2285"); +$sel->is_element_present_ok("link=2287"); +$sel->is_element_present_ok("link=2289"); +$sel->is_element_present_ok("link=2310"); +$sel->is_element_present_ok("link=2315"); +$sel->is_element_present_ok("link=2320"); +$sel->is_element_present_ok("link=2341"); +$sel->is_element_present_ok("link=2342"); +$sel->is_element_present_ok("link=2350"); +$sel->is_element_present_ok("link=2351"); +$sel->is_element_present_ok("link=2375"); +$sel->is_element_present_ok("link=2376"); +$sel->is_element_present_ok("link=2380"); +$sel->is_element_present_ok("link=2400"); +$sel->is_element_present_ok("link=2401"); +$sel->is_element_present_ok("link=2405"); +$sel->is_element_present_ok("link=2450"); +$sel->is_element_present_ok("link=2500"); +$sel->is_element_present_ok("link=2501"); +$sel->is_element_present_ok("link=2505"); +$sel->is_element_present_ok("link=2510"); +$sel->is_element_present_ok("link=2520"); +$sel->is_element_present_ok("link=2600"); +$sel->is_element_present_ok("link=2650"); +$sel->is_element_present_ok("link=2657"); +$sel->is_element_present_ok("link=2660"); +$sel->is_element_present_ok("link=2670"); +$sel->is_element_present_ok("link=2680"); +$sel->is_element_present_ok("link=2700"); +$sel->is_element_present_ok("link=2710"); +$sel->is_element_present_ok("link=2715"); +$sel->is_element_present_ok("link=2720"); +$sel->is_element_present_ok("link=2725"); +$sel->is_element_present_ok("link=2730"); +$sel->is_element_present_ok("link=2732"); +$sel->is_element_present_ok("link=2733"); +$sel->is_element_present_ok("link=2735"); +$sel->is_element_present_ok("link=2739"); +$sel->is_element_present_ok("link=2742"); +$sel->is_element_present_ok("link=2743"); +$sel->is_element_present_ok("link=2744"); +$sel->is_element_present_ok("link=2746"); +$sel->is_element_present_ok("link=2747"); +$sel->is_element_present_ok("link=2750"); +$sel->is_element_present_ok("link=2797"); +$sel->is_element_present_ok("link=3000"); +$sel->is_element_present_ok("link=3090"); +$sel->is_element_present_ok("link=3100"); +$sel->is_element_present_ok("link=3110"); +$sel->is_element_present_ok("link=3120"); +$sel->is_element_present_ok("link=3300"); +$sel->is_element_present_ok("link=3400"); +$sel->is_element_present_ok("link=3420"); +$sel->is_element_present_ok("link=3425"); +$sel->is_element_present_ok("link=3440"); +$sel->is_element_present_ok("link=3550"); +$sel->is_element_present_ok("link=3559"); +$sel->is_element_present_ok("link=3580"); +$sel->is_element_present_ok("link=3581"); +$sel->is_element_present_ok("link=3582"); +$sel->is_element_present_ok("link=3589"); +$sel->is_element_present_ok("link=3600"); +$sel->is_element_present_ok("link=3610"); +$sel->is_element_present_ok("link=3650"); +$sel->is_element_present_ok("link=3731"); +$sel->is_element_present_ok("link=3735"); +$sel->is_element_present_ok("link=3750"); +$sel->is_element_present_ok("link=3760"); +$sel->is_element_present_ok("link=3780"); +$sel->is_element_present_ok("link=3790"); +$sel->is_element_present_ok("link=3800"); +$sel->is_element_present_ok("link=3830"); +$sel->is_element_present_ok("link=3850"); +$sel->is_element_present_ok("link=3960"); +$sel->is_element_present_ok("link=3970"); +$sel->is_element_present_ok("link=3980"); +$sel->is_element_present_ok("link=3990"); +$sel->is_element_present_ok("link=4000"); +$sel->is_element_present_ok("link=4110"); +$sel->is_element_present_ok("link=4120"); +$sel->is_element_present_ok("link=4125"); +$sel->is_element_present_ok("link=4126"); +$sel->is_element_present_ok("link=4127"); +$sel->is_element_present_ok("link=4130"); +$sel->is_element_present_ok("link=4138"); +$sel->is_element_present_ok("link=4139"); +$sel->is_element_present_ok("link=4140"); +$sel->is_element_present_ok("link=4145"); +$sel->is_element_present_ok("link=4149"); +$sel->is_element_present_ok("link=4150"); +$sel->is_element_present_ok("link=4167"); +$sel->is_element_present_ok("link=4170"); +$sel->is_element_present_ok("link=4175"); +$sel->is_element_present_ok("link=4180"); +$sel->is_element_present_ok("link=4190"); +$sel->is_element_present_ok("link=4199"); +$sel->is_element_present_ok("link=4200"); +$sel->is_element_present_ok("link=4210"); +$sel->is_element_present_ok("link=4220"); +$sel->is_element_present_ok("link=4230"); +$sel->is_element_present_ok("link=4240"); +$sel->is_element_present_ok("link=4250"); +$sel->is_element_present_ok("link=4260"); +$sel->is_element_present_ok("link=4261"); +$sel->is_element_present_ok("link=4271"); +$sel->is_element_present_ok("link=4280"); +$sel->is_element_present_ok("link=4288"); +$sel->is_element_present_ok("link=4289"); +$sel->is_element_present_ok("link=4301"); +$sel->is_element_present_ok("link=4305"); +$sel->is_element_present_ok("link=4320"); +$sel->is_element_present_ok("link=4340"); +$sel->is_element_present_ok("link=4350"); +$sel->is_element_present_ok("link=4355"); +$sel->is_element_present_ok("link=4360"); +$sel->is_element_present_ok("link=4361"); +$sel->is_element_present_ok("link=4380"); +$sel->is_element_present_ok("link=4390"); +$sel->is_element_present_ok("link=4396"); +$sel->is_element_present_ok("link=4397"); +$sel->is_element_present_ok("link=4500"); +$sel->is_element_present_ok("link=4505"); +$sel->is_element_present_ok("link=4510"); +$sel->is_element_present_ok("link=4515"); +$sel->is_element_present_ok("link=4520"); +$sel->is_element_present_ok("link=4525"); +$sel->is_element_present_ok("link=4530"); +$sel->is_element_present_ok("link=4535"); +$sel->is_element_present_ok("link=4540"); +$sel->is_element_present_ok("link=4545"); +$sel->is_element_present_ok("link=4550"); +$sel->is_element_present_ok("link=4560"); +$sel->is_element_present_ok("link=4565"); +$sel->is_element_present_ok("link=4570"); +$sel->is_element_present_ok("link=4580"); +$sel->is_element_present_ok("link=4595"); +$sel->is_element_present_ok("link=4600"); +$sel->is_element_present_ok("link=4610"); +$sel->is_element_present_ok("link=4630"); +$sel->is_element_present_ok("link=4635"); +$sel->is_element_present_ok("link=4638"); +$sel->is_element_present_ok("link=4640"); +$sel->is_element_present_ok("link=4650"); +$sel->is_element_present_ok("link=4651"); +$sel->is_element_present_ok("link=4652"); +$sel->is_element_present_ok("link=4653"); +$sel->is_element_present_ok("link=4654"); +$sel->is_element_present_ok("link=4655"); +$sel->is_element_present_ok("link=4660"); +$sel->is_element_present_ok("link=4663"); +$sel->is_element_present_ok("link=4664"); +$sel->is_element_present_ok("link=4666"); +$sel->is_element_present_ok("link=4668"); +$sel->is_element_present_ok("link=4670"); +$sel->is_element_present_ok("link=4673"); +$sel->is_element_present_ok("link=4674"); +$sel->is_element_present_ok("link=4676"); +$sel->is_element_present_ok("link=4678"); +$sel->is_element_present_ok("link=4679"); +$sel->is_element_present_ok("link=4680"); +$sel->is_element_present_ok("link=4700"); +$sel->is_element_present_ok("link=4710"); +$sel->is_element_present_ok("link=4730"); +$sel->is_element_present_ok("link=4750"); +$sel->is_element_present_ok("link=4760"); +$sel->is_element_present_ok("link=4780"); +$sel->is_element_present_ok("link=4790"); +$sel->is_element_present_ok("link=4800"); +$sel->is_element_present_ok("link=4805"); +$sel->is_element_present_ok("link=4806"); +$sel->is_element_present_ok("link=4809"); +$sel->is_element_present_ok("link=4810"); +$sel->is_element_present_ok("link=4815"); +$sel->is_element_present_ok("link=4822"); +$sel->is_element_present_ok("link=4824"); +$sel->is_element_present_ok("link=4826"); +$sel->is_element_present_ok("link=4830"); +$sel->is_element_present_ok("link=4831"); +$sel->is_element_present_ok("link=4832"); +$sel->is_element_present_ok("link=4840"); +$sel->is_element_present_ok("link=4841"); +$sel->is_element_present_ok("link=4842"); +$sel->is_element_present_ok("link=4843"); +$sel->is_element_present_ok("link=4850"); +$sel->is_element_present_ok("link=4851"); +$sel->is_element_present_ok("link=4852"); +$sel->is_element_present_ok("link=4855"); +$sel->is_element_present_ok("link=4860"); +$sel->is_element_present_ok("link=4870"); +$sel->is_element_present_ok("link=4875"); +$sel->is_element_present_ok("link=4880"); +$sel->is_element_present_ok("link=4900"); +$sel->is_element_present_ok("link=4905"); +$sel->is_element_present_ok("link=4909"); +$sel->is_element_present_ok("link=4910"); +$sel->is_element_present_ok("link=4920"); +$sel->is_element_present_ok("link=4925"); +$sel->is_element_present_ok("link=4930"); +$sel->is_element_present_ok("link=4940"); +$sel->is_element_present_ok("link=4945"); +$sel->is_element_present_ok("link=4946"); +$sel->is_element_present_ok("link=4950"); +$sel->is_element_present_ok("link=4955"); +$sel->is_element_present_ok("link=4957"); +$sel->is_element_present_ok("link=4960"); +$sel->is_element_present_ok("link=4965"); +$sel->is_element_present_ok("link=4966"); +$sel->is_element_present_ok("link=4969"); +$sel->is_element_present_ok("link=4970"); +$sel->is_element_present_ok("link=4980"); +$sel->is_element_present_ok("link=4985"); +$sel->is_element_present_ok("link=4990"); +$sel->is_element_present_ok("link=4992"); +$sel->is_element_present_ok("link=4993"); +$sel->is_element_present_ok("link=4994"); +$sel->is_element_present_ok("link=4995"); +$sel->is_element_present_ok("link=8100"); +$sel->is_element_present_ok("link=8110"); +$sel->is_element_present_ok("link=8120"); +$sel->is_element_present_ok("link=8125"); +$sel->is_element_present_ok("link=8130"); +$sel->is_element_present_ok("link=8135"); +$sel->is_element_present_ok("link=8150"); +$sel->is_element_present_ok("link=8190"); +$sel->is_element_present_ok("link=8195"); +$sel->is_element_present_ok("link=8200"); +$sel->is_element_present_ok("link=8300"); +$sel->is_element_present_ok("link=8310"); +$sel->is_element_present_ok("link=8315"); +$sel->is_element_present_ok("link=8320"); +$sel->is_element_present_ok("link=8400"); +$sel->is_element_present_ok("link=8500"); +$sel->is_element_present_ok("link=8506"); +$sel->is_element_present_ok("link=8508"); +$sel->is_element_present_ok("link=8520"); +$sel->is_element_present_ok("link=8540"); +$sel->is_element_present_ok("link=8580"); +$sel->is_element_present_ok("link=8581"); +$sel->is_element_present_ok("link=8582"); +$sel->is_element_present_ok("link=8589"); +$sel->is_element_present_ok("link=8590"); +$sel->is_element_present_ok("link=8591"); +$sel->is_element_present_ok("link=8595"); +$sel->is_element_present_ok("link=8600"); +$sel->is_element_present_ok("link=8650"); +$sel->is_element_present_ok("link=8700"); +$sel->is_element_present_ok("link=8710"); +$sel->is_element_present_ok("link=8720"); +$sel->is_element_present_ok("link=8725"); +$sel->is_element_present_ok("link=8726"); +$sel->is_element_present_ok("link=8727"); +$sel->is_element_present_ok("link=8731"); +$sel->is_element_present_ok("link=8735"); +$sel->is_element_present_ok("link=8750"); +$sel->is_element_present_ok("link=8760"); +$sel->is_element_present_ok("link=8780"); +$sel->is_element_present_ok("link=8790"); +$sel->is_element_present_ok("link=8800"); +$sel->is_element_present_ok("link=8801"); +$sel->is_element_present_ok("link=8807"); +$sel->is_element_present_ok("link=8808"); +$sel->is_element_present_ok("link=8809"); +$sel->is_element_present_ok("link=8820"); +$sel->is_element_present_ok("link=8827"); +$sel->is_element_present_ok("link=8828"); +$sel->is_element_present_ok("link=8829"); +$sel->is_element_present_ok("link=8900"); +$sel->is_element_present_ok("link=8905"); +$sel->is_element_present_ok("link=8910"); +$sel->is_element_present_ok("link=8915"); +$sel->is_element_present_ok("link=8919"); +$sel->is_element_present_ok("link=8920"); +$sel->is_element_present_ok("link=8921"); +$sel->is_element_present_ok("link=8922"); +$sel->is_element_present_ok("link=8924"); +$sel->is_element_present_ok("link=8925"); +$sel->is_element_present_ok("link=8930"); +$sel->is_element_present_ok("link=8935"); +$sel->is_element_present_ok("link=8939"); +$sel->is_element_present_ok("link=8940"); +$sel->is_element_present_ok("link=8945"); +$sel->is_element_present_ok("link=8949"); +$sel->is_element_present_ok("link=8950"); +$sel->is_element_present_ok("link=8955"); +$sel->is_element_present_ok("link=8960"); +$sel->is_element_present_ok("link=8970"); +$sel->is_element_present_ok("link=8980"); +$sel->is_element_present_ok("link=8990"); +$sel->is_element_present_ok("link=9000"); +$sel->is_element_present_ok("link=9008"); +$sel->is_element_present_ok("link=9009"); +$sel->is_element_present_ok("link=9090"); + +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/begin/S013TestAccount.t b/t/selenium/testscripts/system/begin/S013TestAccount.t new file mode 100644 index 000000000..34213f8a0 --- /dev/null +++ b/t/selenium/testscripts/system/begin/S013TestAccount.t @@ -0,0 +1,31 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Test Account"); + +$sel->select_frame_ok("relative=up") if (!($sel->get_title() eq "Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})); +$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); +$sel->click_ok("link=Konten anzeigen"); +$sel->wait_for_page_to_load($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->click_ok("link=000000000001"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +# Die folegenden Zeilen testen die Checkboxen im Formular, welche nach bestimmten Regeln gelöscht werden. +# Hiefür muß erst ein Konzept erstellt werden, wann eine Checkbox aktiviert ist und wann nicht. + +# Test für das erste Konto, bei dem alle Felder deaktiviert werden müssen +isnt($sel->is_checked("//input[(\@name=\"AR_amount\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"AR_paid\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"AR_tax\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"AP_amount\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"AP_paid\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"AP_tax\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"IC_sale\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"IC_cogs\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"IC_taxpart\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"IC_income\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"IC_expense\")]"), 1, "Checkboxcheck"); +isnt($sel->is_checked("//input[(\@name=\"IC_taxservice\")]"), 1, "Checkboxcheck"); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S992DeleteProductGroups.t b/t/selenium/testscripts/system/end/S992DeleteProductGroups.t index bacf536c3..2cc780393 100644 --- a/t/selenium/testscripts/system/end/S992DeleteProductGroups.t +++ b/t/selenium/testscripts/system/end/S992DeleteProductGroups.t @@ -1,24 +1,33 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Delete product groups"); +TODO: { + local $TODO = "Benutzte Preisgruppen können nicht gelöscht werden!"; -if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ - require_ok("../../begin/B004Login.t"); -} + if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ + require_ok("../../begin/B004Login.t"); + } -$sel->select_frame_ok("relative=up"); -$sel->click_ok("link=Warengruppen anzeigen"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->select_frame_ok("main_window"); -$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->click_ok("link=TestSeleniumWarengruppe1"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->click_ok("document.forms[0].action[1]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->click_ok("link=TestSeleniumWarengruppe2"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->click_ok("document.forms[0].action[1]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->click_ok("link=TestSeleniumWarengruppe3"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->click_ok("document.forms[0].action[1]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); \ No newline at end of file + $sel->select_frame_ok("relative=up"); + $sel->click_ok("link=Warengruppen anzeigen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=TestSeleniumWarengruppe1"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=TestSeleniumWarengruppe2"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=TestSeleniumWarengruppe3"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +} +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S994DeleteAccount.t b/t/selenium/testscripts/system/end/S994DeleteAccount.t new file mode 100644 index 000000000..cd9d38cb4 --- /dev/null +++ b/t/selenium/testscripts/system/end/S994DeleteAccount.t @@ -0,0 +1,19 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} +diag("Delete Account"); + +$sel->select_frame_ok("relative=up"); +$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); +$sel->click_ok("link=Konten anzeigen"); +$sel->wait_for_page_to_load($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->click_ok("link=000000000001"); +$sel->wait_for_page_to_load_ok("30000"); +$sel->click_ok("document.EditAccount.action[1]"); +$sel->wait_for_page_to_load_ok("30000"); +isnt($sel->is_element_present("link=000000000001"),1,"Tests whether link for created acc is present"); +isnt($sel->is_text_present("TestSeleniumKonto"),1,"Tests wheter text of created acc is present"); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t b/t/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t index c2999b061..204137492 100644 --- a/t/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t +++ b/t/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Delete customer/vendor types"); $sel->select_frame_ok("relative=up"); @@ -13,3 +18,4 @@ $sel->click_ok("link=Kleink $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->click_ok("document.forms[0].action[1]"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S996DeletePaymentConditions.t b/t/selenium/testscripts/system/end/S996DeletePaymentConditions.t index dbfcc5903..d0bd0196b 100644 --- a/t/selenium/testscripts/system/end/S996DeletePaymentConditions.t +++ b/t/selenium/testscripts/system/end/S996DeletePaymentConditions.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Delete payment conditions"); $sel->select_frame_ok("relative=up"); @@ -8,3 +13,4 @@ $sel->click_ok("link=Schnellzahler/Skonto"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->click_ok("document.forms[0].action[1]"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S997DeleteLanguages.t b/t/selenium/testscripts/system/end/S997DeleteLanguages.t index 49092fd45..4cd9c2d6c 100644 --- a/t/selenium/testscripts/system/end/S997DeleteLanguages.t +++ b/t/selenium/testscripts/system/end/S997DeleteLanguages.t @@ -1,3 +1,8 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Delete languages"); $sel->select_frame_ok("relative=up"); @@ -8,3 +13,4 @@ $sel->click_ok("link=elbisch"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); $sel->click_ok("document.forms[0].action[1]"); $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +1; \ No newline at end of file diff --git a/t/selenium/testscripts/system/end/S998DeletePriceBrackets.t b/t/selenium/testscripts/system/end/S998DeletePriceBrackets.t index fef93c44b..7fab1fac7 100644 --- a/t/selenium/testscripts/system/end/S998DeletePriceBrackets.t +++ b/t/selenium/testscripts/system/end/S998DeletePriceBrackets.t @@ -1,17 +1,30 @@ +if(!defined $sel) { + require "t/selenium/AllTests.t"; + init_server("singlefileonly",$0); + exit(0); +} diag("Delete price brackets"); +TODO: { + local $TODO = "Benutzte Preisgruppen können nicht gelöscht werden!"; + + if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){ + require_ok("../../begin/B004Login.t"); + } -$sel->select_frame_ok("relative=up"); -$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); -$sel->click_ok("link=Preisgruppen anzeigen"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->select_frame_ok("main_window"); -$sel->click_ok("action"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->click_ok("link=SeleniumTestPreisgruppe1"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->click_ok("document.forms[0].action[1]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->click_ok("link=SeleniumTestPreisgruppe2"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); -$sel->click_ok("document.forms[0].action[1]"); -$sel->wait_for_page_to_load_ok($lxtest->{timeout}); \ No newline at end of file + $sel->select_frame_ok("relative=up"); + $sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); + $sel->click_ok("link=Preisgruppen anzeigen"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->select_frame_ok("main_window"); + $sel->click_ok("action"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=SeleniumTestPreisgruppe1"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("link=SeleniumTestPreisgruppe2"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); + $sel->click_ok("document.forms[0].action[1]"); + $sel->wait_for_page_to_load_ok($lxtest->{timeout}); +} +1; \ No newline at end of file -- 2.20.1