]> wagnertech.de Git - mfinanz.git/blobdiff - t/old/selenium/testscripts/base/000Login.t
Automatisierte Syntaxtests, Framework für spätere Modultests.
[mfinanz.git] / t / old / selenium / testscripts / base / 000Login.t
diff --git a/t/old/selenium/testscripts/base/000Login.t b/t/old/selenium/testscripts/base/000Login.t
new file mode 100644 (file)
index 0000000..864ebd1
--- /dev/null
@@ -0,0 +1,36 @@
+### Login
+
+if(!defined $sel) {
+  require "t/selenium/AllTests.t";
+  init_server("singlefileonly",$0);
+  exit(0);
+}
+
+diag("Login");
+
+$sel->open_ok($lxtest->{lxbaseurl}."/login.pl");
+
+$sel->wait_for_page_to_load_ok($lxtest->{timeout}); 
+$sel->title_is("Lx-Office Version ".$lxtest->{version});
+$sel->type_ok("login", $lxtest->{testuserlogin});
+$sel->type_ok("password", $lxtest->{testuserpasswd});
+$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Anmeldung\")]");
+
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+
+if($sel->get_text("//td") eq "Ungültiger Benutzername oder falsches Passwort!") {
+  diag("\n\n\n\nWrong username or password!\n\n\n\n");
+  $sel->stop;
+  exit(-1);
+}
+
+if($sel->get_title() eq "Datenbankaktualisierung - Lx-Office Version 2.4.3 - -") {
+  $sel->click_ok("//input[(\@name=\"dummy\") and (\@value=\"Weiter\")]");
+  $sel->wait_for_page_to_load_ok($lxtest->{timeoutlong}); 
+  $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->{ran_tests}{"t/selenium/testscripts/base/999Logout.t"} = 0;
+1;
\ No newline at end of file