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