Debian Codegraph @

dojox/mvc/tests/1.7/robot/mvc_search-results-ins-del.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
4 <title>doh.robot MVC search-results-ins-del Test</title>
5
6 <style>
7 @import "../../../../../util/doh/robot/robot.css";
8 </style>
9
10 <!-- required: dojo.js -->
11 <script type="text/javascript" src="../../../../../dojo/dojo.js"
12 djConfig="isDebug: true, parseOnLoad: true"></script>
13
14 <script type="text/javascript" src="../helpers.js"></script>
15
16 <script type="text/javascript">
17 dojo.require("dijit.robotx");
18
19 dojo.addOnLoad(function(){
20 doh.robot.initRobot('../test_mvc_search-results-ins-del.html');
21
22 doh.register("on_test_MVC_Search_Results_Repeat", [
23 {
24 name: "initial conditions",
25 timeout: 9000,
26 runTest: function(){
27 var d = new doh.Deferred();
28 console.debug("dojo.version() is "+dojo.version);
29 doh.robot.mouseMoveAt("firstInput", 500, 0);
30 doh.robot.mouseClick({left:true}, 500);
31
32 doh.robot.sequence(d.getTestCallback(function(){
33 doh.is("Anne", dijit.byId("nameInput0").get('value'),"nameInput0 should be Anne");
34 doh.is("Ben", dijit.byId("nameInput1").get('value'),"nameInput1 should be Ben");
35 doh.is("John", dijit.byId("nameInput9").get('value'),"nameInput9 should be John");
36 doh.is("Anne", dijit.byId("firstInput").get('value'),"firstInput should be Anne");
37 doh.is("Ackerman", dijit.byId("lastInput").get('value'),"lastInput should be Ackerman");
38 doh.is("[email protected]", dijit.byId("emailInput").get('value'),"emailInput should be [email protected]");
39 }), 1000);
40 return d;
41 }
42 },
43 /* {
44 name: "selectBen",
45 timeout: 9000,
46 runTest: function(){
47 var d = new doh.Deferred();
48
49 doh.robot.mouseMoveAt("dijit_form_Button_4", 500, 0);
50 doh.robot.mouseClick({left:true}, 500);
51
52 doh.robot.sequence(d.getTestCallback(function(){
53 doh.is("Ben", dijit.byId("firstInput").get('value'),"firstInput should be Ben");
54 doh.is("Beckham", dijit.byId("lastInput").get('value'),"lastInput should be Beckham");
55 doh.is("[email protected]", dijit.byId("emailInput").get('value'),"emailInput should be [email protected]");
56 }), 1000);
57 return d;
58 }
59 },
60 */
61 {
62 name: "selectJohn",
63 timeout: 9000,
64 runTest: function(){
65 var d = new doh.Deferred();
66
67 doh.robot.mouseMoveAt("dijit_form_Button_30", 500, 0);
68 doh.robot.mouseClick({left:true}, 500);
69
70 doh.robot.sequence(d.getTestCallback(function(){
71 doh.is("John", dijit.byId("firstInput").get('value'),"firstInput should be John");
72 doh.is("Jacklin", dijit.byId("lastInput").get('value'),"lastInput should be Jacklin");
73 doh.is("[email protected]", dijit.byId("emailInput").get('value'),"emailInput should be [email protected]");
74 }), 1000);
75 return d;
76 }
77 },
78 {
79 name: "changeJohn",
80 timeout: 9000,
81 runTest: function(){
82 var d = new doh.Deferred();
83
84 doh.robot.mouseMoveAt("firstInput", 500, 0);
85 doh.robot.mouseClick({left:true}, 500);
86
87 doh.robot.keyPress(dojo.keys.BACKSPACE, 500, {});
88 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
89 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
90 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
91 doh.robot.typeKeys("Johnny", 300, 600);
92 doh.robot.keyPress(dojo.keys.TAB, 500, {});
93
94 doh.robot.sequence(d.getTestCallback(function(){
95 doh.is("Johnny", dijit.byId("firstInput").get('value'),"firstInput should be Johnny");
96 doh.is("Johnny", dijit.byId("nameInput9").get('value'),"nameInput9 should be Johnny");
97 }), 1000);
98 return d;
99 }
100 },
101 {
102 name: "changeBen",
103 timeout: 9000,
104 runTest: function(){
105 var d = new doh.Deferred();
106
107 doh.robot.mouseMoveAt("dijit_form_Button_6", 500, 0);
108 doh.robot.mouseClick({left:true}, 500);
109
110 doh.robot.mouseMoveAt("nameInput1", 500, 0);
111 doh.robot.mouseClick({left:true}, 500);
112
113 doh.robot.typeKeys("jamin", 300, 600);
114 doh.robot.keyPress(dojo.keys.TAB, 500, {});
115
116 doh.robot.sequence(d.getTestCallback(function(){
117 doh.is("Benjamin", dijit.byId("firstInput").get('value'),"check for firstInput set to Benjamin");
118 doh.is("Benjamin", dijit.byId("nameInput1").get('value'),"check for nameInput1 set to Benjamin");
119 }), 1500);
120 return d;
121 }
122 },
123 {
124 name: "AddKen",
125 timeout: 20000,
126 runTest: function(){
127 var d = new doh.Deferred();
128
129 doh.robot.mouseMoveAt("dijit_form_Button_31", 500, 0);
130 doh.robot.mouseClick({left:true}, 500);
131
132 doh.robot.mouseMoveAt("dijit_form_Button_63", 2000, 0);
133 doh.robot.mouseClick({left:true}, 500);
134
135 doh.robot.mouseMoveAt("firstInput", 500, 0);
136 doh.robot.mouseClick({left:true}, 500);
137
138 doh.robot.typeKeys("Ken", 300, 600);
139 doh.robot.keyPress(dojo.keys.TAB, 500, {});
140 doh.robot.typeKeys("Kelly", 300, 600);
141 doh.robot.keyPress(dojo.keys.TAB, 500, {});
142 doh.robot.typeKeys("CA", 300, 600);
143 doh.robot.keyPress(dojo.keys.TAB, 500, {});
144 doh.robot.typeKeys("5623", 300, 600);
145 doh.robot.keyPress(dojo.keys.TAB, 500, {});
146 doh.robot.typeKeys("[email protected]", 300, 600);
147 doh.robot.keyPress(dojo.keys.TAB, 300, {});
148 doh.robot.typeKeys("408-764-3454", 300, 600);
149 doh.robot.keyPress(dojo.keys.TAB, 500, {});
150 doh.robot.typeKeys("408-764-6000", 300, 600);
151
152 doh.robot.sequence(d.getTestCallback(function(){
153 doh.is("Ken", dijit.byId("firstInput").get('value'),"firstInput should be Ken");
154 doh.is("Ken", dijit.byId("nameInput10").get('value'),"nameInput10 should be Ken");
155 doh.is("Kelly", dijit.byId("lastInput").get('value'),"lastInput should be set");
156 doh.is("CA", dijit.byId("locationInput").get('value'),"locationInput should be set");
157 doh.is("5623", dijit.byId("officeInput").get('value'),"officeInput should be set");
158 doh.is("[email protected]", dijit.byId("emailInput").get('value'),"emailInput should be set");
159 doh.is("408-764-3454", dijit.byId("telInput").get('value'),"telInput should be set");
160 doh.is("408-764-6000", dijit.byId("faxInput").get('value'),"faxInput should be set");
161 }), 1000);
162 return d;
163 }
164 },
165 /* {
166 name: "AddBetty",
167 timeout: 20000,
168 runTest: function(){
169 var d = new doh.Deferred();
170
171 doh.robot.mouseMoveAt("dijit_form_Button_37", 500, 0);
172 doh.robot.mouseClick({left:true}, 500);
173
174 doh.robot.mouseMoveAt("dijit_form_Button_72", 2000, 0);
175 doh.robot.mouseClick({left:true}, 500);
176
177 doh.robot.mouseMoveAt("nameInput2", 500, 0);
178 doh.robot.mouseClick({left:true}, 500);
179
180 doh.robot.typeKeys("Betty", 500, 1000);
181 doh.robot.mouseMoveAt("lastInput", 500, 0);
182 doh.robot.mouseClick({left:true}, 500);
183 doh.robot.typeKeys("Baker", 500, 1000);
184 doh.robot.keyPress(dojo.keys.TAB, 500, {});
185 doh.robot.typeKeys("CA", 500, 1000);
186 doh.robot.keyPress(dojo.keys.TAB, 500, {});
187 doh.robot.typeKeys("5624", 500, 1000);
188 doh.robot.keyPress(dojo.keys.TAB, 500, {});
189 doh.robot.typeKeys("[email protected]", 500, 1000);
190 doh.robot.keyPress(dojo.keys.TAB, 500, {});
191 doh.robot.typeKeys("408-764-3455", 500, 1000);
192 doh.robot.keyPress(dojo.keys.TAB, 500, {});
193 doh.robot.typeKeys("408-764-6000", 500, 1000);
194 //doh.robot.keyPress(dojo.keys.TAB, 500, {});
195
196
197 doh.robot.sequence(d.getTestCallback(function(){
198 doh.is("Betty", dijit.byId("firstInput").get('value'),"firstInput should be set");
199 doh.is("Betty", dijit.byId("nameInput2").get('value'),"faxInput should be set");
200 doh.is("Baker", dijit.byId("lastInput").get('value'),"nameInput2 should be set");
201 doh.is("CA", dijit.byId("locationInput").get('value'),"locationInput should be set");
202 doh.is("5624", dijit.byId("officeInput").get('value'),"officeInput should be set");
203 doh.is("[email protected]", dijit.byId("emailInput").get('value'),"emailInput should be set");
204 doh.is("408-764-3455", dijit.byId("telInput").get('value'),"telInput should be set");
205 doh.is("408-764-6000", dijit.byId("faxInput").get('value'),"faxInput should be set");
206 }), 1000);
207 return d;
208 }
209 },
210 {
211 name: "RemoveBetty",
212 timeout: 20000,
213 runTest: function(){
214 var d = new doh.Deferred();
215
216 doh.robot.mouseMoveAt("dijit_form_Button_74", 500, 0);
217 doh.robot.mouseClick({left:true}, 500);
218
219 doh.robot.mouseMoveAt("dijit_form_Button_114", 2000, 0);
220 doh.robot.mouseClick({left:true}, 500);
221
222 doh.robot.mouseMoveAt("dijit_form_Button_108", 500, 0);
223 doh.robot.mouseClick({left:true}, 500);
224
225 doh.robot.mouseMoveAt("nameInput2", 500, 0);
226 doh.robot.mouseClick({left:true}, 500);
227
228
229 doh.robot.sequence(d.getTestCallback(function(){
230 doh.is("Chad", dijit.byId("firstInput").get('value'),"firstInput should be set");
231 doh.is("Chad", dijit.byId("nameInput2").get('value'),"nameInput2 should be set");
232 }), 1000);
233 return d;
234 }
235 },
236 {
237 name: "RemoveKen",
238 timeout: 20000,
239 runTest: function(){
240 var d = new doh.Deferred();
241
242 doh.robot.mouseMoveAt("dijit_form_Button_134", 500, 0);
243 doh.robot.mouseClick({left:true}, 500);
244
245 doh.robot.sequence(d.getTestCallback(function(){
246 doh.is("Chad", dijit.byId("firstInput").get('value'),"firstInput should be set");
247 doh.is(undefined, dijit.byId("nameInput10"),"nameInput10 should be set");
248 }), 1000);
249 return d;
250 }
251 }
252 */
253 {
254 name: "RemoveKen",
255 timeout: 20000,
256 runTest: function(){
257 var d = new doh.Deferred();
258
259 doh.robot.mouseMoveAt("dijit_form_Button_39", 500, 0);
260 doh.robot.mouseClick({left:true}, 500);
261
262 doh.robot.mouseMoveAt("dijit_form_Button_65", 500, 0);
263 doh.robot.mouseClick({left:true}, 500);
264
265 doh.robot.sequence(d.getTestCallback(function(){
266 doh.is("Chad", dijit.byId("firstInput").get('value'),"firstInput should be set");
267 doh.is(undefined, dijit.byId("nameInput10"),"nameInput10 should be set");
268 }), 1000);
269 return d;
270 }
271 }
272 ]);
273 doh.run();
274 });
275 </script>
276 </html>