13
13
logExclude : {
14
14
'attribute' : true ,
15
15
'base' : true ,
16
- 'get' : true ,
16
+ // 'get': true,
17
17
'loader' : true ,
18
18
'yui' : true ,
19
19
'widget' : true ,
@@ -62,9 +62,9 @@ var window = Y.config.win;
62
62
Assert . areEqual ( byId ( 'test-nodes' ) , Y . Node . getDOMNode ( Y . one ( '#test-nodes' ) ) , 'Y.one("#test-nodes")' ) ;
63
63
Assert . areEqual ( 'test-nodes' , Y . one ( '#test-nodes' ) . get ( 'id' ) , 'Y.one("#test-nodes").get("id")' ) ;
64
64
Assert . areEqual ( node , Y . one ( '#test-nodes' ) , 'node === Y.one("#test-nodes")' ) ;
65
-
65
+
66
66
Assert . areEqual ( byId ( 'test-nodes' ) . getElementsByTagName ( 'li' ) [ 0 ] ,
67
- Y . Node . getDOMNode ( Y . one ( '#test-nodes li:first-child' ) ) , 'Y.one("#test-nodes")' ) ;
67
+ Y . Node . getDOMNode ( Y . one ( '#test-nodes li:first-child' ) ) , 'Y.one("#test-nodes li:first-child ")' ) ;
68
68
69
69
Assert . areEqual ( byId ( 'test-nodes' ) . getElementsByTagName ( 'li' ) [ 1 ] ,
70
70
Y . Node . getDOMNode ( Y . one ( '#test-nodes li:nth-child(2)' ) ) , 'Y.one("#test-nodes:nth-child(2)")' ) ;
@@ -98,10 +98,12 @@ var window = Y.config.win;
98
98
ArrayAssert . itemsAreEqual ( Y . Selector . query ( 'input[name]' ) , Y . all ( Y . Selector . query ( 'input[name]' ) ) . _nodes , "Y.all(Y.Selector.query('input[name]'))" ) ;
99
99
100
100
ArrayAssert . itemsAreEqual ( Y . Selector . query ( '.foo' ) , Y . all ( Y . Selector . query ( '.foo' ) ) . _nodes , "Y.all(Y.Selector.query('.foo'))" ) ;
101
-
101
+
102
+ /*
102
103
var frameDoc = Y.one('iframe').get('contentWindow.document');
103
104
Assert.areEqual('iframe foo', Y.Lang.trim(frameDoc.one('#demo li').get('innerHTML')),
104
105
"frameDoc.one('#demo li').get('innerHTML')");
106
+ */
105
107
106
108
ArrayAssert . itemsAreEqual ( [ document . body ] , Y . all ( document . body ) . _nodes , "Y.all(document.body)" ) ;
107
109
Assert . areSame ( Y . one ( 'doc' ) , Y . one ( 'doc' ) , "Y.one('doc') === Y.one('doc')" ) ;
@@ -309,7 +311,7 @@ var window = Y.config.win;
309
311
Y . one ( '#test-select' ) . set ( 'value' , 1 ) ;
310
312
Assert . areEqual ( 1 , Y . one ( '#test-select' ) . get ( 'value' ) , "Y.one('#test-select').set('value', 1)" ) ;
311
313
Y . one ( '#test-select' ) . set ( 'value' , 'baz' ) ;
312
- Assert . areEqual ( 'baz' , Y . one ( '#test-select' ) . get ( 'value' ) , "Y.one('#test-select').set('value', 1 )" ) ;
314
+ Assert . areEqual ( 'baz' , Y . one ( '#test-select' ) . get ( 'value' ) , "Y.one('#test-select').set('value', 'baz' )" ) ;
313
315
} ,
314
316
315
317
test_dom_methods : function ( ) {
@@ -341,6 +343,8 @@ var window = Y.config.win;
341
343
Assert . areEqual ( 1 , clone . get ( 'nodeType' ) , 'cloneNode()' ) ;
342
344
343
345
// TODO: test deep clone with bound descendant
346
+ console . log ( node . get ( 'outerHTML' ) ) ;
347
+ console . log ( node . cloneNode ( true ) . get ( 'outerHTML' ) ) ;
344
348
Assert . isTrue ( node . get ( 'childNodes' ) . size ( ) === node . cloneNode ( true ) . get ( 'childNodes' ) . size ( ) , 'node.get("childNodes").size() === node.cloneNode(true).get("childNodes").size()' ) ;
345
349
346
350
Assert . isTrue ( Y . one ( '.bar' ) . test ( '.bar' ) , "Y.one('.bar').test('.bar')" ) ;
@@ -420,7 +424,8 @@ var window = Y.config.win;
420
424
Assert . areEqual ( element , Y . Node . getDOMNode ( frag . get ( 'firstChild' ) ) , 'frag.appendChild()' ) ;
421
425
Y . one ( 'body' ) . appendChild ( frag ) ;
422
426
} ,
423
-
427
+
428
+ /*
424
429
test_screen: function() {
425
430
var id = 'test-prop';
426
431
var element = byId(id);
@@ -438,7 +443,6 @@ var window = Y.config.win;
438
443
var y = Math.round(xy[1]);
439
444
ArrayAssert.itemsAreEqual([100, 100], [x, y], 'Node.getXY("foo", "bar")');
440
445
},
441
- /*
442
446
test_region: function() {
443
447
Assert.isTrue(Y.DOM.inRegion(byId('baz'), byId('doc')), 'DOM.inRegion(domNode, domNode)');
444
448
Assert.isTrue(Y.one('#get-style').inRegion(byId('doc')), 'node.inRegion(domNode)');
@@ -614,31 +618,6 @@ var window = Y.config.win;
614
618
Assert . isNotNull ( Y . one ( 'body' ) . get ( 'winHeight' ) , 'body.get("winHeight")' ) ;
615
619
} ,
616
620
617
- test_scroll : function ( ) {
618
- Y . one ( '#test-scroll' ) . set ( 'scrollTop' , 100 ) ;
619
- Y . one ( '#test-scroll' ) . set ( 'scrollLeft' , 200 ) ;
620
- Assert . areEqual ( 100 , byId ( 'test-scroll' ) . scrollTop , 'test-scroll.set("scrollTop", 100)' ) ;
621
- Assert . areEqual ( 200 , byId ( 'test-scroll' ) . scrollLeft , 'test-scroll.set("scrollLeft", 200)' ) ;
622
- document . body . style . height = '5000px' ;
623
- document . body . style . width = '5000px' ;
624
- /*
625
- Y.one(window).set('scrollTop', 100);
626
- Y.one(window).set('scrollLeft', 200);
627
- Assert.areEqual(100, Y.DOM.docScrollY(window), 'window.set("scrollTop", 100)');
628
- Assert.areEqual(200, Y.DOM.docScrollX(window), 'window.set("scrollLeft", 200)');
629
- */
630
-
631
- Y . one ( document ) . set ( 'scrollTop' , 200 ) ;
632
- Y . one ( document ) . set ( 'scrollLeft' , 100 ) ;
633
- Assert . areEqual ( 200 , Y . DOM . docScrollY ( document ) , 'document.set("scrollTop", 200)' ) ;
634
- Assert . areEqual ( 100 , Y . DOM . docScrollX ( document ) , 'document.set("scrollLeft", 100)' ) ;
635
-
636
- document . body . style . height = '' ;
637
- document . body . style . width = '' ;
638
-
639
- window . scrollTo ( 0 , 0 ) ;
640
- } ,
641
-
642
621
test_setContent : function ( ) {
643
622
var content = '<strong>foo</strong>' ;
644
623
Y . one ( '#test-insert-html' ) . setContent ( content ) ;
@@ -758,7 +737,7 @@ var window = Y.config.win;
758
737
759
738
//console.log(node._node.outerHTML);
760
739
node . insert ( '<strong>baz</strong>' , node . one ( 'span' ) ) ;
761
- console . log ( node . _node . outerHTML ) ;
740
+ // console.log(node._node.outerHTML);
762
741
Assert . areEqual ( 'STRONG' , node . _node . childNodes [ 1 ] . tagName ,
763
742
"node.insert('<strong>baz</strong>', node.one('span')" ) ;
764
743
0 commit comments