Fortführung der Struturierung und hinzufügen von Systemtests, sowie globaler Login...
[kivitendo-erp.git] / t / selenium / testscripts / masterdata / begin / M002CreateVendor.t
1 diag("Create vendor");
2
3 if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
4   require_ok("../../begin/B004Login.t");
5 }
6
7 $sel->select_frame_ok("relative=up");
8 $sel->click_ok("link=Lieferant erfassen");
9 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
10 diag("Create first vendor");
11 $sel->select_frame_ok("main_window");
12 $sel->click_ok("vendornumber");
13 $sel->type_ok("vendornumber", "1");
14 $sel->click_ok("selected_company_greeting");
15 $sel->select_ok("selected_company_greeting", "label=Firma");
16 $sel->click_ok("//option[2]");
17 $sel->click_ok("name");
18 $sel->type_ok("name", "TestLieferant1");
19 $sel->type_ok("department_1", "GossAus");
20 $sel->type_ok("street", "Berger 1");
21 $sel->type_ok("zipcode", "11990");
22 $sel->type_ok("city", "Drehmel");
23 $sel->type_ok("country", "Germany");
24 $sel->type_ok("contact", "Herr Custom");
25 $sel->type_ok("phone", "01234 56787902");
26 $sel->type_ok("fax", "01234 567879023");
27 $sel->type_ok("email", "custom\@linet-services.de");
28 $sel->type_ok("account_number", "2");
29 $sel->click_ok("obsolete");
30 $sel->click_ok("obsolete");
31 $sel->type_ok("notes", "keine Bemerkungen");
32 $sel->click_ok("link=Lieferadresse");
33 $sel->click_ok("shipto_id");
34 $sel->select_ok("shipto_id", "label=Alle");
35 $sel->click_ok("//tr[1]/td/select/option[2]");
36 $sel->click_ok("link=Ansprechpartner");
37 $sel->click_ok("cp_id");
38 $sel->click_ok("cp_id");
39 $sel->click_ok("cp_greeting");
40 $sel->click_ok("selected_cp_greeting");
41 $sel->select_ok("selected_cp_greeting", "label=Frau");
42 $sel->click_ok("//tr[2]/td/select/option[2]");
43 $sel->click_ok("cp_title");
44 $sel->click_ok("selected_cp_title");
45 $sel->click_ok("cp_title");
46 $sel->type_ok("cp_title", "Diplom Meterologin");
47 $sel->click_ok("cp_abteilung");
48 $sel->type_ok("cp_title", "Dipl. Inf.");
49 $sel->click_ok("cp_title");
50 $sel->click_ok("cp_title");
51 $sel->type_ok("cp_title", "Dipl. Ing.");
52 $sel->click_ok("cp_abteilung");
53 $sel->type_ok("cp_abteilung", "Externes");
54 $sel->type_ok("cp_givenname", "Hildegunde");
55 $sel->type_ok("cp_name", "Riess");
56 $sel->type_ok("cp_phone1", "0111 222333444 5");
57 $sel->click_ok("cp_birthday");
58 $sel->type_ok("cp_birthday", "12.03.1964");
59 $sel->click_ok("link=Lieferungen");
60 $sel->click_ok("action");
61 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
62 $sel->click_ok("link=Rechnungsadresse");
63 $sel->click_ok("document.ct.action[1]");
64 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
65 diag("Create second vendor");
66 $sel->click_ok("vendornumber");
67 $sel->type_ok("vendornumber", "2");
68 $sel->click_ok("greeting");
69 $sel->click_ok("selected_company_greeting");
70 $sel->select_ok("selected_company_greeting", "label=Firma");
71 $sel->click_ok("//option[2]");
72 $sel->click_ok("name");
73 $sel->type_ok("name", "TestLieferant2");
74 $sel->type_ok("department_1", "Verkauf");
75 $sel->type_ok("department_2", "Orga");
76 $sel->type_ok("street", "Wlkenweg 3");
77 $sel->type_ok("zipcode", "09090");
78 $sel->type_ok("city", "Brummbach");
79 $sel->click_ok("city");
80 $sel->type_ok("city", "Markt Brummbach");
81 $sel->click_ok("country");
82 $sel->type_ok("country", "Germany");
83 $sel->click_ok("document.ct.action[1]");
84 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
85 diag("Create third vendor");
86 $sel->click_ok("link=Rechnungsadresse");
87 $sel->click_ok("vendornumber");
88 $sel->type_ok("vendornumber", "3");
89 $sel->click_ok("selected_company_greeting");
90 $sel->select_ok("selected_company_greeting", "label=Firma");
91 $sel->click_ok("//option[2]");
92 $sel->type_ok("name", "TestFirma3 GmbH");
93 $sel->type_ok("fax", "03232 7272727273");
94 $sel->type_ok("creditlimit", "50000");
95 $sel->type_ok("discount", "10");
96 $sel->click_ok("link=Lieferadresse");
97 $sel->click_ok("shiptoname");
98 $sel->type_ok("shiptoname", "TestFirma3 GmbH");
99 $sel->type_ok("shiptodepartment_1", "Vertrieb");
100 $sel->type_ok("shiptostreet", "Grummelsburger  1423");
101 $sel->type_ok("shiptozipcode", "40000");
102 $sel->type_ok("shiptocity", "Hansastadt");
103 $sel->type_ok("shiptocountry", "Germany");
104 $sel->type_ok("shiptocontact", "Herr Baumann von Clausen");
105 $sel->type_ok("shiptophone", "03232 7272727272");
106 $sel->type_ok("shiptofax", "03232 7272727273");
107 $sel->type_ok("shiptoemail", "baumann\@linet-services.de");
108 $sel->click_ok("link=Ansprechpartner");
109 $sel->click_ok("selected_cp_greeting");
110 $sel->click_ok("cp_greeting");
111 $sel->type_ok("cp_greeting", "Herr");
112 $sel->type_ok("cp_abteilung", "Vertrieb");
113 $sel->type_ok("cp_givenname", "Dietmar");
114 $sel->type_ok("cp_name", "Baumann von Clausen");
115 $sel->type_ok("cp_phone1", "03232 7272727272");
116 $sel->type_ok("cp_fax", "03232 7272727273");
117 $sel->type_ok("cp_birthday", "14.05.1971");
118 $sel->click_ok("link=Lieferungen");
119 $sel->click_ok("document.ct.action[1]");
120 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
121