TestScript für Login
[kivitendo-erp.git] / t / selenium / testscripts / 001CreateTestDatabase.t
1 ### Create Database
2
3 $sel->open_ok($lxtest->{lxadmin});
4 #$sel->title_is("Lx-Office ERP Administration -");
5 #
6 if($sel->get_title() eq "") {
7   $sel->open_ok($lxtest->{lxadmin_url});
8   $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Anmeldung\")]");
9   $sel->wait_for_page_to_load_ok($lxtest->{timeout});
10 }
11
12 $sel->title_is("Lx-Office ERP ".$lxtest->{version}." Administration -");
13
14 diag('Lock the system');
15 $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]");
16 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
17
18 diag("Create test database '$lxtest->{db}'");
19 $sel->title_is("Lx-Office ERP Administration -");
20 $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]");
21 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
22 $sel->title_is("Lx-Office ERP / Datenbankadministration -");
23 $sel->type_ok("dbuser", $lxtest->{dbuser});
24 $sel->type_ok("dbpasswd", $lxtest->{dbpasswd});
25 $sel->type_ok("dbhost", $lxtest->{dbhost});
26 $sel->type_ok("dbport", $lxtest->{dbport});
27 $sel->type_ok("dbdefault", $lxtest->{dbdefault});
28 $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank anlegen\")]");
29 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
30 $sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank anlegen -");
31 $sel->type_ok("db", $lxtest->{db});
32 $sel->select_ok("encoding", "label=ISO 8859-1");
33 $sel->click_ok("//input[(\@name=\"chart\") and (\@value=\"Germany-DATEV-SKR03EU\")]");
34 $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]");
35 $sel->wait_for_page_to_load_ok($lxtest->{timeoutlong});
36 $sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank anlegen -");
37 $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]");
38 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
39 $sel->title_is("Lx-Office ERP Administration -");
40
41 diag('Unlock the system');
42 $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]");
43 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
44 $sel->title_is("Lx-Office ERP Administration -");