sample skeleton application with dojo toolkit & arcgis js api v 4.30
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
659 B

define(["doh", "dojo/_base/declare", "../Selection", "dijit/_WidgetBase"],
function(doh, declare, Selection, _WidgetBase){
doh.register("tests.Selection", [
function test_Lifecycle(t){
var C = declare("MyWidget", [_WidgetBase, Selection], {
updateRenderers: function(){
}
});
var o = new C();
o.set("selectedItem", "1");
t.is("1", o.get("selectedItem"));
t.is(["1"], o.get("selectedItems"));
o.set("selectedItems", ["2"]);
t.is("2", o.get("selectedItem"));
t.is(["2"], o.get("selectedItems"));
o = new C({selectedItem: "1"});
t.is("1", o.get("selectedItem"));
t.is(["1"], o.get("selectedItems"));
}
]);
});