dijit
Version:
Dijit provides a complete collection of user interface controls based on Dojo, giving you the power to create web applications that are highly optimized for usability, performance, internationalization, accessibility, but above all deliver an incredible u
65 lines (51 loc) • 1.47 kB
HTML
<html>
<head>
<title>robot Custom TreeNode Test</title>
<style>
@import "../../../../util/doh/robot/robot.css";
</style>
<script type="text/javascript" src="../../../../dojo/dojo.js"></script>
<script type="text/javascript">
require([
"doh/runner", "dojo/robotx",
"dojo/keys", "dojo/query",
"dijit/tests/helpers","dojo/domReady!"
], function(doh, robot, keys, query, helpers){
var tree,registry;
robot.initRobot('../test_Custom_TreeNode.html');
doh.register("_setup", [
{
name: "wait for widgets to load",
timeout: 10000,
runTest: helpers.waitForLoad
},
function setVars(){
registry = robot.window.require("dijit/registry");
tree = dojo.global.tree;
}
]);
doh.register("arrow navigation", [
{
name: "right arrow, down arrow",
timeout: 4000,
runTest: function(){
var d = new doh.Deferred();
var firstVisibleNode = query(".dijitTreeLabel", robot.doc)[1];
firstVisibleNode.focus();
robot.keyPress(keys.RIGHT_ARROW, 100);
robot.keyPress(keys.RIGHT_ARROW, 100);
robot.sequence(d.getTestCallback(function(){
var focus = dojo.global.dijit.focus.curNode;
doh.is("Child_0", helpers.innerText(focus), "focused on first child");
}), 500);
return d;
}
}
]);
doh.run();
});
</script>
</head>
</html>