File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,12 @@ describe('Grid factory', function () {
127127 }
128128 } ) ;
129129 describe ( 'scrollbarHeight and scrollbarWidth' , function ( ) {
130+ beforeEach ( function ( ) {
131+ spyOn ( gridUtil , 'getScrollbarWidth' ) . and . returnValue ( 100 ) ;
132+ } ) ;
133+ afterEach ( function ( ) {
134+ gridUtil . getScrollbarWidth . calls . reset ( ) ;
135+ } ) ;
130136 describe ( 'when enableHorizontalScrollbar not equal to NEVER' , function ( ) {
131137 it ( 'should set scrollbarHeight and scrollbarWidth' , function ( ) {
132138 var grid = new Grid ( {
@@ -135,8 +141,8 @@ describe('Grid factory', function () {
135141 enableVerticalScrollbar : uiGridConstants . scrollbars . ALWAYS
136142 } ) ;
137143
138- expect ( grid . scrollbarHeight ) . not . toEqual ( 0 ) ;
139- expect ( grid . scrollbarWidth ) . not . toEqual ( 0 ) ;
144+ expect ( grid . scrollbarHeight ) . toEqual ( 100 ) ;
145+ expect ( grid . scrollbarWidth ) . toEqual ( 100 ) ;
140146 } ) ;
141147 } ) ;
142148 describe ( 'when enableHorizontalScrollbar is equal to NEVER' , function ( ) {
You can’t perform that action at this time.
0 commit comments