File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -159,4 +159,20 @@ describe('Directive: pfFilter', function () {
159159 expect ( activeFilters . length ) . toBe ( 0 ) ;
160160 expect ( clearButtons . length ) . toBe ( 0 ) ;
161161 } ) ;
162- } )
162+
163+ it ( 'should not show selected results when selectedCount and totalCount are undefined' , function ( ) {
164+ $scope . filterConfig . selectedCount = undefined ;
165+ $scope . filterConfig . totalCount = undefined ;
166+ $scope . $digest ( ) ;
167+
168+ expect ( element . find ( '.pf-table-view-selected-label' ) . length ) . toBe ( 0 ) ;
169+ } ) ;
170+
171+ it ( 'should show selected results and totalCount are defined' , function ( ) {
172+ $scope . filterConfig . selectedCount = 0 ;
173+ $scope . filterConfig . totalCount = 10 ;
174+ $scope . $digest ( ) ;
175+
176+ expect ( element . find ( '.pf-table-view-selected-label' ) . text ( ) ) . toContain ( '0 of 10 selected' ) ;
177+ } ) ;
178+ } ) ;
You can’t perform that action at this time.
0 commit comments