]> wagnertech.de Git - kivitendo-erp.git/blobdiff - t/selenium/testscripts/system/begin/S003AddLanguage.t
Umstellung von TODO auf SKIP und Verkürzung der Tests damit um mehr als 5 Minuten...
[kivitendo-erp.git] / t / selenium / testscripts / system / begin / S003AddLanguage.t
index 8c2b7c9ea09f9bdede629a44a746c00ef079339b..4d745b87bbbc58282b2d85735247837447223164 100644 (file)
@@ -4,26 +4,28 @@ if(!defined $sel) {
   exit(0);
 }
 diag("Add languages");
-
-$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();
-
+SKIP: {
+  start_login();
+  
+  $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});
+  
+  ### Folgende Zeilen sind notwendig , um später herausfinden zu können, welche Sprache gelöscht werden kann.
+  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