X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/111276a18a6edd391c7d653f77003fe24ae00d8f..9b057fb953934c00c255acc2aaf2f1254beb6860:/t/selenium/testscripts/system/begin/S003AddLanguage.t diff --git a/t/selenium/testscripts/system/begin/S003AddLanguage.t b/t/selenium/testscripts/system/begin/S003AddLanguage.t new file mode 100644 index 000000000..376b429c4 --- /dev/null +++ b/t/selenium/testscripts/system/begin/S003AddLanguage.t @@ -0,0 +1,28 @@ +diag("Add languages"); + +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=Sprache hinzufügen"); +$sel->wait_for_page_to_load($lxtest->{timeout}); +$sel->select_frame_ok("main_window"); +$sel->type_ok("description", "elbisch"); +$sel->type_ok("template_code", "elb"); +$sel->type_ok("article_code", "elb"); +$sel->select_ok("output_numberformat", "label=1.000,00"); +$sel->select_ok("output_dateformat", "label=yyyy-mm-dd"); +$sel->click_ok("action"); +$sel->wait_for_page_to_load($lxtest->{timeout}); + +use DBI; +$lxtest->{dsn} = 'dbi:Pg:dbname=' . $lxtest->{db} . ';host=' . $lxtest->{dbhost} . ';port=' . $lxtest->{dbport}; +my $dbh = DBI->connect( $lxtest->{dsn}, $lxtest->{dbuser}, $lxtest->{dbpasswd} ) or die "Cannot connect to database!\n $DBI::errstr"; +my $sth = $dbh->prepare("SELECT id FROM language WHERE description ILIKE 'elbisch'") or die "Error while preparing sql statement!\n $DBI::errstr\n"; +$sth->execute() or die "Error while excecuting sql statement!\n $DBI::errstr"; +$lxtest->{lang_id} = $sth->fetchrow_array() or die "Nothing to fetch!\n$DBI::errstr"; +$sth->finish(); +$dbh->disconnect(); + +1; \ No newline at end of file