@@ -86,7 +86,7 @@ describe('uiGridCell', function () {
86
86
} ) ) ;
87
87
} ) ;
88
88
89
- it ( ' should change a columns class when its uid changes' , inject ( function ( gridUtil , $compile , uiGridConstants ) {
89
+ it ( " should change a column's class when its uid changes" , inject ( function ( gridUtil , $compile , uiGridConstants ) {
90
90
// Reset the UIDs (used by columns) so they're fresh and clean
91
91
gridUtil . resetUids ( ) ;
92
92
@@ -113,8 +113,8 @@ describe('uiGridCell', function () {
113
113
var class1 = _ ( firstCol [ 0 ] . className . split ( / \s + / ) ) . find ( function ( c ) { return classRegEx . test ( c ) ; } ) ;
114
114
115
115
// The first column should be 100px wide because we said it should be
116
- expect ( firstCol . outerWidth ( ) ) . toEqual ( 100 , 'first cell is 100px' ) ;
117
- expect ( firstHeaderCell . innerWidth ( ) ) . toEqual ( 99 , "header cell is 100px less border" ) ;
116
+ expect ( firstCol . innerWidth ( ) ) . toEqual ( 100 , 'first cell is 100px, counting border ' ) ;
117
+ expect ( firstHeaderCell . innerWidth ( ) ) . toEqual ( 100 , "header cell is 100px, counting border" ) ;
118
118
119
119
// Now swap the columns in the column defs
120
120
$scope . gridOptions . columnDefs = [ { field : 'age' , width : 50 } , { field : 'name' , width : 100 } ] ;
@@ -128,14 +128,14 @@ describe('uiGridCell', function () {
128
128
expect ( class2 ) . not . toEqual ( class1 ) ;
129
129
130
130
// The first column should now be 50px wide
131
- expect ( firstColAgain . outerWidth ( ) ) . toEqual ( 50 , 'first cell again is 50 ' ) ;
132
- expect ( firstHeaderCellAgain . innerWidth ( ) ) . toEqual ( 49 , 'header cell again is 50px less border' ) ;
131
+ expect ( firstColAgain . innerWidth ( ) ) . toEqual ( 50 , 'first cell again is 50px, counting border ' ) ;
132
+ expect ( firstHeaderCellAgain . innerWidth ( ) ) . toEqual ( 50 , 'header cell again is 50px, counting border' ) ;
133
133
134
134
// ... and the last column should now be 100px wide
135
135
var lastCol = $ ( gridElm ) . find ( '.ui-grid-cell' ) . last ( ) ;
136
136
var lastHeaderCell = $ ( gridElm ) . find ( '.ui-grid-header-cell' ) . last ( ) ;
137
- expect ( lastCol . outerWidth ( ) ) . toEqual ( 100 , 'last cell again is 100px' ) ;
138
- expect ( lastHeaderCell . innerWidth ( ) ) . toEqual ( 99 , 'last header cell again is 100px less border' ) ;
137
+ expect ( lastCol . innerWidth ( ) ) . toEqual ( 100 , 'last cell again is 100px, counting border ' ) ;
138
+ expect ( lastHeaderCell . innerWidth ( ) ) . toEqual ( 100 , 'last header cell again is 100px, counting border' ) ;
139
139
140
140
angular . element ( gridElm ) . remove ( ) ;
141
141
} ) ) ;
0 commit comments