Updated
This commit is contained in:
171
master/examples/android_repeat-ins.html
Normal file
171
master/examples/android_repeat-ins.html
Normal file
@@ -0,0 +1,171 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>doh.robot MVC search-results-ins-del 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_Android-repeat-data-store.html');
|
||||
|
||||
doh.register("on_test_MVC_Search_Results_Repeat", [
|
||||
{
|
||||
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(){
|
||||
doh.is("Chad", dijit.byId("nameInput0").get('value'),"nameInput0 should be Chad");
|
||||
doh.is("Hunter", dijit.byId("nameInput1").get('value'),"nameInput1 should be Hunter");
|
||||
doh.is("John", dijit.byId("nameInput2").get('value'),"nameInput2 should be John");
|
||||
doh.is("Chad", dijit.byId("firstInput").get('value'),"firstInput should be Chad");
|
||||
doh.is("Chapman", dijit.byId("lastInput").get('value'),"lastInput should be Chapman");
|
||||
doh.is("c.c@test.com", dijit.byId("emailInput").get('value'),"emailInput should be c.c@test.com");
|
||||
}), 1000);
|
||||
return d;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "selectHunter",
|
||||
timeout: 9000,
|
||||
runTest: function(){
|
||||
var d = new doh.Deferred();
|
||||
|
||||
doh.robot.mouseMoveAt("details1", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.sequence(d.getTestCallback(function(){
|
||||
doh.is("Hunter", dijit.byId("firstInput").get('value'),"firstInput should be Hunter");
|
||||
doh.is("Huffman", dijit.byId("lastInput").get('value'),"lastInput should be Huffman");
|
||||
doh.is("h.h@test.com", dijit.byId("emailInput").get('value'),"emailInput should be h.h@test.com");
|
||||
}), 1000);
|
||||
return d;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "selectJohn",
|
||||
timeout: 9000,
|
||||
runTest: function(){
|
||||
var d = new doh.Deferred();
|
||||
|
||||
doh.robot.mouseMoveAt("details2", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.sequence(d.getTestCallback(function(){
|
||||
doh.is("John", dijit.byId("firstInput").get('value'),"firstInput should be John");
|
||||
doh.is("Jacklin", dijit.byId("lastInput").get('value'),"lastInput should be Jacklin");
|
||||
doh.is("j.j@test.com", dijit.byId("emailInput").get('value'),"emailInput should be j.j@test.com");
|
||||
}), 1000);
|
||||
return d;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "changeJohn",
|
||||
timeout: 9000,
|
||||
runTest: function(){
|
||||
var d = new doh.Deferred();
|
||||
|
||||
doh.robot.mouseMoveAt("firstInput", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.keyPress(dojo.keys.BACKSPACE, 500, {});
|
||||
doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
|
||||
doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
|
||||
doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
|
||||
doh.robot.typeKeys("Johnny", 1000, 2000);
|
||||
doh.robot.keyPress(dojo.keys.TAB, 500, {});
|
||||
|
||||
doh.robot.sequence(d.getTestCallback(function(){
|
||||
doh.is("Johnny", dijit.byId("firstInput").get('value'),"firstInput should be Johnny");
|
||||
doh.is("Johnny", dijit.byId("nameInput2").get('value'),"nameInput2 should be Johnny");
|
||||
}), 1000);
|
||||
return d;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "changeHunter",
|
||||
timeout: 9000,
|
||||
runTest: function(){
|
||||
var d = new doh.Deferred();
|
||||
|
||||
doh.robot.mouseMoveAt("details1", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.mouseMoveAt("nameInput1", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.keyPress(dojo.keys.BACKSPACE, 500, {});
|
||||
doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
|
||||
doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
|
||||
doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
|
||||
doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
|
||||
doh.robot.keyPress(dojo.keys.BACKSPACE, 200, {});
|
||||
doh.robot.typeKeys("Howard", 500, 1000);
|
||||
doh.robot.keyPress(dojo.keys.TAB, 500, {});
|
||||
|
||||
doh.robot.sequence(d.getTestCallback(function(){
|
||||
doh.is("Howard", dijit.byId("firstInput").get('value'),"check for firstInput set to Howard");
|
||||
doh.is("Howard", dijit.byId("nameInput1").get('value'),"check for nameInput1 set to Howard");
|
||||
}), 1500);
|
||||
return d;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "AddKen",
|
||||
timeout: 20000,
|
||||
runTest: function(){
|
||||
var d = new doh.Deferred();
|
||||
|
||||
//doh.robot.mouseMoveAt("dijit_form_Button_29", 500, 0);
|
||||
//doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.mouseMoveAt("add", 2000, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.mouseMoveAt("firstInput", 500, 0);
|
||||
doh.robot.mouseClick({left:true}, 500);
|
||||
|
||||
doh.robot.typeKeys("Ken", 500, 1000);
|
||||
doh.robot.keyPress(dojo.keys.TAB, 500, {});
|
||||
doh.robot.typeKeys("Kelly", 500, 1000);
|
||||
doh.robot.keyPress(dojo.keys.TAB, 500, {});
|
||||
//doh.robot.typeKeys("CA", 500, 1000);
|
||||
//doh.robot.keyPress(dojo.keys.TAB, 500, {});
|
||||
//doh.robot.typeKeys("5623", 500, 1000);
|
||||
//doh.robot.keyPress(dojo.keys.TAB, 500, {});
|
||||
doh.robot.typeKeys("k.k@test.com", 500, 1000);
|
||||
doh.robot.keyPress(dojo.keys.TAB, 500, {});
|
||||
doh.robot.typeKeys("408-764-3454", 500, 1000);
|
||||
doh.robot.keyPress(dojo.keys.TAB, 500, {});
|
||||
doh.robot.typeKeys("408-764-6000", 500, 1000);
|
||||
|
||||
doh.robot.sequence(d.getTestCallback(function(){
|
||||
doh.is("Ken", dijit.byId("firstInput").get('value'),"firstInput should be Ken");
|
||||
doh.is("Ken", dijit.byId("nameInput3").get('value'),"nameInput4 should be Ken");
|
||||
doh.is("Kelly", dijit.byId("lastInput").get('value'),"lastInput should be set");
|
||||
//doh.is("CA", dijit.byId("locationInput").get('value'),"locationInput should be set");
|
||||
//doh.is("5623", dijit.byId("officeInput").get('value'),"officeInput should be set");
|
||||
doh.is("k.k@test.com", dijit.byId("emailInput").get('value'),"emailInput should be set");
|
||||
doh.is("408-764-3454", dijit.byId("telInput").get('value'),"telInput should be set");
|
||||
doh.is("408-764-6000", dijit.byId("faxInput").get('value'),"faxInput should be set");
|
||||
}), 1000);
|
||||
return d;
|
||||
}
|
||||
} ]);
|
||||
doh.run();
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user