dojox
Version:
Dojo eXtensions, a rollup of many useful sub-projects and varying states of maturity – from very stable and robust, to alpha and experimental. See individual projects contain README files for details.
60 lines (50 loc) • 2.06 kB
HTML
<html>
<head>
<title>doh.robot Tooltip Mouse Quirks Test</title>
<style>
@import "../../../../util/doh/robot/robot.css";
</style>
<!-- required: dojo.js -->
<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true"></script>
<script language="JavaScript" type="text/javascript">
require([
"dojo/_base/kernel",
"dojo/dom-class", // dojo.hasClass
"dojo/ready", // dojo.ready
"doh/runner", //doh functions
"dijit/registry", // dijit.registry.byId
"dijit/robotx"
], function(kernel, domClass, ready, runner, registry){
ready(function(){
runner.robot.initRobot("../test_RoundRectList-check.html");
runner.register("dojox.mobile.ButtonList mouse tests", [
{
name: "ButtonList mouse tests",
timeout: 10000,
runTest: function(){
var d = new runner.Deferred();
var reg = kernel.global.dijit.registry;
runner.robot.mouseMoveAt(reg.byId("dojox_mobile_ListItem_2").domNode, 1000);
runner.robot.mouseClick({left: true}, 500);
runner.robot.mouseMoveAt(reg.byId("dojox_mobile_ListItem_3").domNode, 1000);
runner.robot.mouseClick({left: true}, 500);
runner.robot.mouseMoveAt(reg.byId("dojox_mobile_ListItem_4").domNode, 1000);
runner.robot.mouseClick({left: true}, 500);
runner.robot.sequence(d.getTestCallback(function(){
doh.assertTrue(domClass.contains(reg.byId("dojox_mobile_ListItem_2").domNode, "mblListItemUnchecked"), "dojox_mobile_ListItem_2");
doh.assertTrue(domClass.contains(reg.byId("dojox_mobile_ListItem_3").domNode, "mblListItemChecked"), "dojox_mobile_ListItem_3");
doh.assertTrue(domClass.contains(reg.byId("dojox_mobile_ListItem_4").domNode, "mblListItemChecked"), "dojox_mobile_ListItem_3");
}), 1000);
return d;
}
}
]);
runner.run();
});
});
</script>
</head>
<body />
</html>