test for sub properties added

This commit is contained in:
Vladimir Enchev
2015-04-20 14:02:21 +03:00
committed by Erjan Gavalji
parent 8b9c30f5ea
commit ca3efb18cf

View File

@ -143,4 +143,14 @@ export var test_parse_ShouldParseBindingsWithObservable = function () {
obj.set("myProp", false);
TKUnit.assert(sw.checked === false, "Expected result: false; Actual result: " + sw.checked + "; type: " + typeof (sw.checked));
};
export var test_parse_ShouldParseSubProperties = function () {
var p = <page.Page>builder.parse("<Page><Switch style.visibility='collapsed' checked='{{ myProp }}' /></Page>");
var obj = new observable.Observable();
obj.set("myProp", true);
p.bindingContext = obj;
var sw = <switchModule.Switch>p.content;
TKUnit.assert(sw.visibility === "collapsed", "Expected result: collapsed; Actual result: " + sw.visibility + "; type: " + typeof (sw.visibility));
};