Updated
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>doh.robot MVC demo-shipto-billto-simple Declarative Test</title>
|
||||
|
||||
<style>
|
||||
@import "../../../../util/doh/robot/robot.css";
|
||||
</style>
|
||||
|
||||
<!-- required: dojo.js -->
|
||||
<script type="text/javascript" src="../../../../dojo/dojo.js"
|
||||
djConfig="isDebug: true, parseOnLoad: true"></script>
|
||||
|
||||
<script type="text/javascript" src="../helpers.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
dojo.require("dijit.robotx");
|
||||
|
||||
dojo.addOnLoad(function(){
|
||||
doh.robot.initRobot('../mobile/test_iPhone-shipto-billto.html');
|
||||
|
||||
doh.register("test_iPhone_SimpleDataBoundField", [
|
||||
{
|
||||
name: "initial conditions",
|
||||
timeout: 9000,
|
||||
runTest: function(){
|
||||
var d = new doh.Deferred();
|
||||
console.debug("dojo.version() is "+dojo.version);
|
||||
|
||||
doh.robot.sequence(d.getTestCallback(function(){
|
||||
//"ShipTo" selected
|
||||
doh.is("123 Valley Rd", dijit.byId("streetInput").get('value'),"streetInput should be set");
|
||||
}), 1000);
|
||||
return d;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "billto",
|
||||
timeout: 9000,
|
||||
runTest: function(){
|
||||
var d = new doh.Deferred();
|
||||
|
||||
doh.robot.mouseMoveAt("billto", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.sequence(d.getTestCallback(function(){
|
||||
//"BillTo" selected
|
||||
doh.is("17 Skyline Dr", dijit.byId("streetInput").get('value'),"streetInput should be set");
|
||||
}), 1000);
|
||||
return d;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "shipto",
|
||||
timeout: 9000,
|
||||
runTest: function(){
|
||||
var d = new doh.Deferred();
|
||||
|
||||
doh.robot.mouseMoveAt("shipto", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.sequence(d.getTestCallback(function(){
|
||||
//"ShipTo" selected
|
||||
doh.is("123 Valley Rd", dijit.byId("streetInput").get('value'),"streetInput should be set");
|
||||
}), 1000);
|
||||
return d;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "changeShipToAddress",
|
||||
timeout: 9000,
|
||||
runTest: function(){
|
||||
var d = new doh.Deferred();
|
||||
|
||||
doh.robot.mouseMoveAt("cityInput", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.keyPress(dojo.keys.TAB, 500, {shift:true});
|
||||
doh.robot.keyPress(dojo.keys.DELETE, 500, {});
|
||||
|
||||
doh.robot.typeKeys("456 Mountain Rd", 500, 1000);
|
||||
|
||||
doh.robot.mouseMoveAt("billto", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.mouseMoveAt("shipto", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.mouseMoveAt("streetInput", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.sequence(d.getTestCallback(function(){
|
||||
doh.is("456 Mountain Rd", dijit.byId("streetInput").get('value'),"streetInput should be set");
|
||||
}), 1000);
|
||||
return d;
|
||||
}
|
||||
}
|
||||
]);
|
||||
doh.run();
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user