X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/34211d2356367e21aa8f624caa7b17ee4b8ec4ac..1d91e75c53e7da5bf2c1b334f5aeecf241dc5ec4:/t/old/selenium/testscripts/administration/begin/A003UpdateDatabase.t diff --git a/t/old/selenium/testscripts/administration/begin/A003UpdateDatabase.t b/t/old/selenium/testscripts/administration/begin/A003UpdateDatabase.t new file mode 100644 index 000000000..e835959ee --- /dev/null +++ b/t/old/selenium/testscripts/administration/begin/A003UpdateDatabase.t @@ -0,0 +1,68 @@ +### 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}); + +$sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); +$sel->wait_for_page_to_load($lxtest->{timeout}); +$sel->type("dbuser", $lxtest->{dbuser}); +$sel->type("dbpasswd", $lxtest->{dbpasswd}); +$sel->type("dbuser", $lxtest->{dbuser}); +$sel->type("dbhost", $lxtest->{dbhost}); +$sel->type("dbport", $lxtest->{dbport}); +$sel->type("dbdefault", $lxtest->{dbdefault}); +$sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]"); +$sel->wait_for_page_to_load($lxtest->{timeoutlong}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -"); + +my $count =0; + +while (){ # count the number of radiobuttons + eval { $sel->is_checked("//input[(\@id=\"$count\")]"); }; + if ( $@ ) { $count--; last; }; + $count++; +} + +#TEST: Now run the Tests + +$sel->open_ok($lxtest->{lxadmin}); +$sel->title_is("Lx-Office ERP Administration -"); + +#diag('Lock the system'); +#$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]"); +#$sel->wait_for_page_to_load_ok($lxtest->{timeout}); + +diag('Update the database'); + +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeout}); +$sel->title_is("Lx-Office ERP / Datenbankadministration -"); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbpasswd", $lxtest->{dbpasswd}); +$sel->type_ok("dbuser", $lxtest->{dbuser}); +$sel->type_ok("dbhost", $lxtest->{dbhost}); +$sel->type_ok("dbport", $lxtest->{dbport}); +$sel->type_ok("dbdefault", $lxtest->{dbdefault}); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]"); +$sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); +$sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -"); + +for (my $i=0; $i <= $count; $i++){ + $sel->uncheck_ok("//input[(\@id=\"$i\")]"); +} + +#$sel->click_ok("//input[\@value=\"$lxtest->{db}\"]"); +#$sel->check_ok("//input[\@name=\"db$lxtest->{db}\"]"); +$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]"); +$sel->title_like( qr/Lx-Office ERP Datenbankadministration/ ); + +#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 -"); +1;