File tree Expand file tree Collapse file tree 4 files changed +24
-7
lines changed Expand file tree Collapse file tree 4 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -597,7 +597,7 @@ describe('angular', function(){
597
597
describe ( 'nodeName_' , function ( ) {
598
598
it ( 'should correctly detect node name with "namespace" when xmlns is defined' , function ( ) {
599
599
var div = jqLite ( '<div xmlns:ngtest="http://angularjs.org/">' +
600
- '<ngtest:foo ngtest:attr="bar"></ng:test >' +
600
+ '<ngtest:foo ngtest:attr="bar"></ngtest:foo >' +
601
601
'</div>' ) [ 0 ] ;
602
602
expect ( nodeName_ ( div . childNodes [ 0 ] ) ) . toBe ( 'NGTEST:FOO' ) ;
603
603
expect ( div . childNodes [ 0 ] . getAttribute ( 'ngtest:attr' ) ) . toBe ( 'bar' ) ;
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ describe('compiler', function(){
74
74
75
75
76
76
it ( 'should observe scope' , function ( ) {
77
- scope = compile ( '<span observe="name">' ) ;
77
+ scope = compile ( '<span observe="name"></span> ' ) ;
78
78
expect ( log ) . toEqual ( "" ) ;
79
79
scope . $digest ( ) ;
80
80
scope . name = 'misko' ;
Original file line number Diff line number Diff line change @@ -339,15 +339,26 @@ describe('jqLite', function(){
339
339
expect ( jqLite ( b ) . css ( 'margin' ) ) . toEqual ( '3px' ) ;
340
340
341
341
selector . css ( 'margin' , '' ) ;
342
- expect ( jqLite ( a ) . css ( 'margin' ) ) . toBeFalsy ( ) ;
343
- expect ( jqLite ( b ) . css ( 'margin' ) ) . toBeFalsy ( ) ;
342
+ if ( msie <= 8 ) {
343
+ expect ( jqLite ( a ) . css ( 'margin' ) ) . toBe ( 'auto' ) ;
344
+ expect ( jqLite ( b ) . css ( 'margin' ) ) . toBe ( 'auto' ) ;
345
+ } else {
346
+ expect ( jqLite ( a ) . css ( 'margin' ) ) . toBeFalsy ( ) ;
347
+ expect ( jqLite ( b ) . css ( 'margin' ) ) . toBeFalsy ( ) ;
348
+ }
344
349
} ) ;
345
350
346
351
347
352
it ( 'should set a bunch of css properties specified via an object' , function ( ) {
348
- expect ( jqLite ( a ) . css ( 'margin' ) ) . toBeFalsy ( ) ;
349
- expect ( jqLite ( a ) . css ( 'padding' ) ) . toBeFalsy ( ) ;
350
- expect ( jqLite ( a ) . css ( 'border' ) ) . toBeFalsy ( ) ;
353
+ if ( msie <= 8 ) {
354
+ expect ( jqLite ( a ) . css ( 'margin' ) ) . toBe ( 'auto' ) ;
355
+ expect ( jqLite ( a ) . css ( 'padding' ) ) . toBe ( '0px' ) ;
356
+ expect ( jqLite ( a ) . css ( 'border' ) ) . toBeUndefined ( ) ;
357
+ } else {
358
+ expect ( jqLite ( a ) . css ( 'margin' ) ) . toBeFalsy ( ) ;
359
+ expect ( jqLite ( a ) . css ( 'padding' ) ) . toBeFalsy ( ) ;
360
+ expect ( jqLite ( a ) . css ( 'border' ) ) . toBeFalsy ( ) ;
361
+ }
351
362
352
363
jqLite ( a ) . css ( { 'margin' : '1px' , 'padding' : '2px' , 'border' : '' } ) ;
353
364
Original file line number Diff line number Diff line change @@ -63,6 +63,11 @@ describe("markups", function(){
63
63
} ) ;
64
64
} ) ;
65
65
66
+ afterEach ( function ( ) {
67
+ if ( element ) element . remove ( ) ;
68
+ } ) ;
69
+
70
+
66
71
it ( 'should populate value attribute on OPTION' , function ( ) {
67
72
compile ( '<select name="x"><option>abc</option></select>' ) ;
68
73
expect ( element ) . toHaveValue ( 'abc' ) ;
@@ -114,6 +119,7 @@ describe("markups", function(){
114
119
115
120
it ( 'should bind selected' , function ( ) {
116
121
compile ( '<select><option value=""></option><option ng:selected="{{isSelected}}">Greetings!</option></select>' ) ;
122
+ jqLite ( document . body ) . append ( element )
117
123
scope . isSelected = false ;
118
124
scope . $digest ( ) ;
119
125
expect ( element . children ( ) [ 1 ] . selected ) . toBeFalsy ( ) ;
You can’t perform that action at this time.
0 commit comments