Debian Codegraph @

dojox/mvc/tests/1.7/robot/mvc_shipto-billto-hierarchical.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 shipto-billto-hierarchical 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_shipto-billto-hierarchical.html');
21
22 doh.register("test_MVC_SimpleDataBoundField", [
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.sequence(d.getTestCallback(function(){
30 doh.is("ShipTo", dijit.byId("addrLabel").get('value'));
31 doh.is("123 Valley Rd", dijit.byId("streetInput").get('value'),"streetInput should be set");
32 }), 1000);
33 return d;
34 }
35 },
36 {
37 name: "billto",
38 timeout: 9000,
39 runTest: function(){
40 var d = new doh.Deferred();
41
42 doh.robot.mouseMoveAt("dijit_form_Button_1", 500, 0);
43 doh.robot.mouseClick({left:true}, 500);
44
45 doh.robot.sequence(d.getTestCallback(function(){
46 doh.is("BillTo", dijit.byId("addrLabel").get('value'),"addrLabel should be set");
47 }), 1000);
48 return d;
49 }
50 },
51 {
52 name: "shipto",
53 timeout: 9000,
54 runTest: function(){
55 var d = new doh.Deferred();
56 doh.robot.mouseMoveAt("dijit_form_Button_0", 500, 0);
57 doh.robot.mouseClick({left:true}, 500);
58 doh.robot.mouseClick({left:true}, 500);
59
60 doh.robot.sequence(d.getTestCallback(function(){
61 doh.is("ShipTo", dijit.byId("addrLabel").get('value'),"addrLabel should be set");
62 }), 1000);
63 return d;
64 }
65 },
66 {
67 name: "changeShipToAddress",
68 timeout: 9000,
69 runTest: function(){
70 var d = new doh.Deferred();
71
72 //reset the streetInput textbox
73 //dijit.byId("streetInput").set('value',"");
74
75 doh.robot.mouseMoveAt("addrLabel", 500, 0);
76 doh.robot.mouseClick({left:true}, 500);
77
78 doh.robot.keyPress(dojo.keys.TAB, 500, {});
79 doh.robot.keyPress(dojo.keys.TAB, 500, {});
80 doh.robot.keyPress(dojo.keys.DELETE, 500, {});
81
82 doh.robot.typeKeys("456 Mountain Rd", 500, 1000);
83
84 doh.robot.mouseMoveAt("dijit_form_Button_1_label", 500, 0);
85 doh.robot.mouseClick({left:true}, 500);
86
87 doh.robot.mouseMoveAt("dijit_form_Button_0_label", 500, 0);
88 doh.robot.mouseClick({left:true}, 500);
89
90 doh.robot.mouseMoveAt("streetInput", 500, 0);
91 doh.robot.mouseClick({left:true}, 500);
92
93 doh.robot.sequence(d.getTestCallback(function(){
94 doh.is("456 Mountain Rd", dijit.byId("streetInput").get('value'),"streetInput should be set");
95 }), 1000);
96 return d;
97 }
98 }
99 ]);
100 doh.run();
101 });
102 </script>
103 </html>