diff --git a/test/baidu/fx/mask.js b/test/baidu/fx/mask.js index 03499e1c..2cab8503 100644 --- a/test/baidu/fx/mask.js +++ b/test/baidu/fx/mask.js @@ -11,7 +11,7 @@ test('dom', function() { $(t).css('position', 'absolute'); baidu.fx.mask(t, { onafterfinish : function() { - equals(this._className, 'baidu.fx.mask', 'after finish'); + equals(this.__type, 'baidu.fx.mask', 'after finish'); start(); } }); @@ -27,7 +27,7 @@ test('id', function() { $(t).css('position', 'absolute'); h = baidu.fx.mask(t, { onafterfinish : function() { - equals(this._className, 'baidu.fx.mask'); + equals(this.__type, 'baidu.fx.mask'); start(); } }); diff --git a/test/baidu/ui/Calendar.js b/test/baidu/ui/Calendar.js index d9b01ecf..10ee1235 100644 --- a/test/baidu/ui/Calendar.js +++ b/test/baidu/ui/Calendar.js @@ -217,7 +217,7 @@ module('baidu.ui.Calendar'); var g = function(id, child) { var _id = ''; if (id.charAt(0) == '#') - _id = '#' + ui.getId(id.substr(1)); + _id = '#' + ui.getId(id.substr(1)).replace("$", "\\$"); else if (id.charAt(0) == '.') _id = '.' + ui.getClass(id.substr(1)); child && (_id += ' ' + child); diff --git a/test/baidu/ui/Menubar/Menubar$fx.js b/test/baidu/ui/Menubar/Menubar$fx.js index 94e968ee..2d7db4a2 100644 --- a/test/baidu/ui/Menubar/Menubar$fx.js +++ b/test/baidu/ui/Menubar/Menubar$fx.js @@ -25,7 +25,7 @@ test('Open a common Menubar(fadeIn) ' + 'a custom onafterfinish function'); var len = baidu.fx.current(menu.getBody()).length; equal( - baidu.fx.current(menu.getBody())[len - 1]['_className'], + baidu.fx.current(menu.getBody())[len - 1]['__type'], 'baidu.fx.fadeIn', 'The menubar fadeIn'); menu.close(); } @@ -40,7 +40,7 @@ test('Open a common Menubar(fadeIn) ' + 'a custom onafterfinish function'); var len = baidu.fx.current(menu.getBody()).length; equal( - baidu.fx.current(menu.getBody())[len - 1]['_className'], + baidu.fx.current(menu.getBody())[len - 1]['__type'], 'baidu.fx.fadeOut', 'The menubar fadeOut'); start(); } @@ -72,7 +72,7 @@ test('Open a common Menubar(expand) and' showFxOptions : { onafterfinish : function() { var len = baidu.fx.current(menu.getBody()).length; - var fx = baidu.fx.current(menu.getBody())[len - 1]['_className']; + var fx = baidu.fx.current(menu.getBody())[len - 1]['__type']; var guid = baidu.fx.current(menu.getBody())[len - 1]['guid']; ok(fx == 'baidu.fx.expand_collapse', 'The menubar expand'); @@ -82,7 +82,7 @@ test('Open a common Menubar(expand) and' hideFxOptions : { onafterfinish : function() { var len = baidu.fx.current(menu.getBody()).length; - var fx = baidu.fx.current(menu.getBody())[len - 1]['_className']; + var fx = baidu.fx.current(menu.getBody())[len - 1]['__type']; var guid = baidu.fx.current(menu.getBody())[len - 1]['guid']; ok((fx == 'baidu.fx.expand_collapse') && guid != baidu.fx diff --git a/test/baidu/ui/Tooltip/Tooltip$fx.js b/test/baidu/ui/Tooltip/Tooltip$fx.js index c01f0b53..7875b392 100644 --- a/test/baidu/ui/Tooltip/Tooltip$fx.js +++ b/test/baidu/ui/Tooltip/Tooltip$fx.js @@ -14,7 +14,7 @@ test('Open a common tooltip(fadeIn) and ' showFxOptions : { onafterfinish : function() { var len = baidu.fx.current(tp.getMain()).length; - equal(baidu.fx.current(tp.getMain())[len-1]['_className'], + equal(baidu.fx.current(tp.getMain())[len-1]['__type'], 'baidu.fx.fadeIn', 'The tooltip fadeIn'); tp.close(); } @@ -22,7 +22,7 @@ test('Open a common tooltip(fadeIn) and ' hideFxOptions : { onafterfinish : function() { var len = baidu.fx.current(tp.getMain()).length; - equal(baidu.fx.current(tp.getMain())[len-1]['_className'], + equal(baidu.fx.current(tp.getMain())[len-1]['__type'], 'baidu.fx.fadeOut', 'The tooltip fadeOut'); start(); } @@ -52,7 +52,7 @@ test('Open a common tooltip(expand) and ' onafterfinish : function() { var len = baidu.fx.current(tp.getMain()).length; var len = baidu.fx.current(tp.getMain()).length; - var fx = baidu.fx.current(tp.getMain())[len-1]['_className']; + var fx = baidu.fx.current(tp.getMain())[len-1]['__type']; var guid = baidu.fx.current(tp.getMain())[len-1]['guid']; ok(fx == 'baidu.fx.expand_collapse', 'The tooltip expand'); tp.close(); @@ -61,7 +61,7 @@ test('Open a common tooltip(expand) and ' hideFxOptions : { onafterfinish : function() { var len = baidu.fx.current(tp.getMain()).length; - var fx = baidu.fx.current(tp.getMain())[len-1]['_className']; + var fx = baidu.fx.current(tp.getMain())[len-1]['__type']; var guid = baidu.fx.current(tp.getMain())[len-1]['guid']; ok((fx == 'baidu.fx.expand_collapse') && guid != baidu.fx.current(tp.getMain())[len-1]['_guid'], diff --git a/test/baidu/ui/Tree.js b/test/baidu/ui/Tree.js index e84c3878..db30cde7 100644 --- a/test/baidu/ui/Tree.js +++ b/test/baidu/ui/Tree.js @@ -147,7 +147,7 @@ test('TreeNode constructor', function() { }); equals(node.uiType, 'tree-node', 'check ui type'); equals(node.type, 'leaf', 'check node type'); - ok(/TANGRAM__[a-z]+/.test(node.id), 'check node id : ' + node.id); + ok(/TANGRAM\$\d+/.test(node.id), 'check node id : ' + node.id); }); test('TreeNode function appendData', function() {