Debian Codegraph @

dojox/mvc/tests/1.7/robot/android_repeat-ins.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('../mobile/test_Android-repeat-data-store.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
30 doh.robot.sequence(d.getTestCallback(function(){
31 doh.is("Chad", dijit.byId("nameInput0").get('value'),"nameInput0 should be Chad");
32 doh.is("Hunter", dijit.byId("nameInput1").get('value'),"nameInput1 should be Hunter");
33 doh.is("John", dijit.byId("nameInput2").get('value'),"nameInput2 should be John");
34 doh.is("Chad", dijit.byId("firstInput").get('value'),"firstInput should be Chad");
35 doh.is("Chapman", dijit.byId("lastInput").get('value'),"lastInput should be Chapman");
36 doh.is("[email protected]", dijit.byId("emailInput").get('value'),"emailInput should be [email protected]");
37 }), 1000);
38 return d;
39 }
40 },
41 {
42 name: "selectHunter",
43 timeout: 9000,
44 runTest: function(){
45 var d = new doh.Deferred();
46
47 doh.robot.mouseMoveAt("details1", 500, 0);
48 doh.robot.mouseClick({left:true}, 500);
49
50 doh.robot.sequence(d.getTestCallback(function(){
51 doh.is("Hunter", dijit.byId("firstInput").get('value'),"firstInput should be Hunter");
52 doh.is("Huffman", dijit.byId("lastInput").get('value'),"lastInput should be Huffman");
53 doh.is("[email protected]", dijit.byId("emailInput").get('value'),"emailInput should be [email protected]");
54 }), 1000);
55 return d;
56 }
57 },
58 {
59 name: "selectJohn",
60 timeout: 9000,
61 runTest: function(){
62 var d = new doh.Deferred();
63
64 doh.robot.mouseMoveAt("details2", 500, 0);
65 doh.robot.mouseClick({left:true}, 500);
66
67 doh.robot.sequence(d.getTestCallback(function(){
68 doh.is("John", dijit.byId("firstInput").get('value'),"firstInput should be John");
69 doh.is("Jacklin", dijit.byId("lastInput").get('value'),"lastInput should be Jacklin");
70 doh.is("[email protected]", dijit.byId("emailInput").get('value'),"emailInput should be [email protected]");
71 }), 1000);
72 return d;
73 }
74 },
75 {
76 name: "changeJohn",
77 timeout: 9000,
78 runTest: function(){
79 var d = new doh.Deferred();
80
81 doh.robot.mouseMoveAt("firstInput", 500, 0);
82 doh.robot.mouseClick({left:true}, 500);
83
84 doh.robot.keyPress(dojo.keys.BACKSPACE, 500, {});
85 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
86 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
87 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
88 doh.robot.typeKeys("Johnny", 1000, 2000);
89 doh.robot.keyPress(dojo.keys.TAB, 500, {});
90
91 doh.robot.sequence(d.getTestCallback(function(){
92 doh.is("Johnny", dijit.byId("firstInput").get('value'),"firstInput should be Johnny");
93 doh.is("Johnny", dijit.byId("nameInput2").get('value'),"nameInput2 should be Johnny");
94 }), 1000);
95 return d;
96 }
97 },
98 {
99 name: "changeHunter",
100 timeout: 9000,
101 runTest: function(){
102 var d = new doh.Deferred();
103
104 doh.robot.mouseMoveAt("details1", 500, 0);
105 doh.robot.mouseClick({left:true}, 500);
106
107 doh.robot.mouseMoveAt("nameInput1", 500, 0);
108 doh.robot.mouseClick({left:true}, 500);
109
110 doh.robot.keyPress(dojo.keys.BACKSPACE, 500, {});
111 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
112 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
113 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
114 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
115 doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
116 doh.robot.typeKeys("Howard", 500, 1000);
117 doh.robot.keyPress(dojo.keys.TAB, 500, {});
118
119 doh.robot.sequence(d.getTestCallback(function(){
120 doh.is("Howard", dijit.byId("firstInput").get('value'),"check for firstInput set to Howard");
121 doh.is("Howard", dijit.byId("nameInput1").get('value'),"check for nameInput1 set to Howard");
122 }), 1500);
123 return d;
124 }
125 },
126 {
127 name: "AddKen",
128 timeout: 20000,
129 runTest: function(){
130 var d = new doh.Deferred();
131
132 //doh.robot.mouseMoveAt("dijit_form_Button_29", 500, 0);
133 //doh.robot.mouseClick({left:true}, 500);
134
135 doh.robot.mouseMoveAt("add", 2000, 0);
136 doh.robot.mouseClick({left:true}, 500);
137
138 doh.robot.mouseMoveAt("firstInput", 500, 0);
139 doh.robot.mouseClick({left:true}, 500);
140
141 doh.robot.typeKeys("Ken", 500, 1000);
142 doh.robot.keyPress(dojo.keys.TAB, 500, {});
143 doh.robot.typeKeys("Kelly", 500, 1000);
144 doh.robot.keyPress(dojo.keys.TAB, 500, {});
145 //doh.robot.typeKeys("CA", 500, 1000);
146 //doh.robot.keyPress(dojo.keys.TAB, 500, {});
147 //doh.robot.typeKeys("5623", 500, 1000);
148 //doh.robot.keyPress(dojo.keys.TAB, 500, {});
149 doh.robot.typeKeys("[email protected]", 500, 1000);
150 doh.robot.keyPress(dojo.keys.TAB, 500, {});
151 doh.robot.typeKeys("408-764-3454", 500, 1000);
152 doh.robot.keyPress(dojo.keys.TAB, 500, {});
153 doh.robot.typeKeys("408-764-6000", 500, 1000);
154
155 doh.robot.sequence(d.getTestCallback(function(){
156 doh.is("Ken", dijit.byId("firstInput").get('value'),"firstInput should be Ken");
157 doh.is("Ken", dijit.byId("nameInput3").get('value'),"nameInput4 should be Ken");
158 doh.is("Kelly", dijit.byId("lastInput").get('value'),"lastInput should be set");
159 //doh.is("CA", dijit.byId("locationInput").get('value'),"locationInput should be set");
160 //doh.is("5623", dijit.byId("officeInput").get('value'),"officeInput should be set");
161 doh.is("[email protected]", dijit.byId("emailInput").get('value'),"emailInput should be set");
162 doh.is("408-764-3454", dijit.byId("telInput").get('value'),"telInput should be set");
163 doh.is("408-764-6000", dijit.byId("faxInput").get('value'),"faxInput should be set");
164 }), 1000);
165 return d;
166 }
167 } ]);
168 doh.run();
169 });
170 </script>
171 </html>