@@ -7,18 +7,20 @@ describe('ui.grid.grouping uiGridGroupingService', function () {
7
7
var $rootScope ;
8
8
var $scope ;
9
9
var GridRow ;
10
+ var $timeout ;
10
11
11
12
beforeEach ( module ( 'ui.grid.grouping' ) ) ;
12
13
13
14
beforeEach ( inject ( function ( _uiGridGroupingService_ , _gridClassFactory_ , $templateCache , _uiGridGroupingConstants_ ,
14
- _$rootScope_ , _GridRow_ , _uiGridTreeBaseService_ ) {
15
+ _$rootScope_ , _GridRow_ , _uiGridTreeBaseService_ , _$timeout_ ) {
15
16
uiGridGroupingService = _uiGridGroupingService_ ;
16
17
uiGridGroupingConstants = _uiGridGroupingConstants_ ;
17
18
gridClassFactory = _gridClassFactory_ ;
18
19
$rootScope = _$rootScope_ ;
19
20
$scope = $rootScope . $new ( ) ;
20
21
GridRow = _GridRow_ ;
21
22
uiGridTreeBaseService = _uiGridTreeBaseService_ ;
23
+ $timeout = _$timeout_ ;
22
24
23
25
$templateCache . put ( 'ui-grid/uiGridCell' , '<div/>' ) ;
24
26
$templateCache . put ( 'ui-grid/editableCell' , '<div editable_cell_directive></div>' ) ;
@@ -79,6 +81,23 @@ describe('ui.grid.grouping uiGridGroupingService', function () {
79
81
it ( 'move some columns left, and some columns right' , function ( ) {
80
82
// TODO
81
83
} ) ;
84
+
85
+ iit ( 'will not move header columns' , function ( ) {
86
+
87
+ $timeout ( function ( ) {
88
+ grid . addRowHeaderColumn ( { name :'aRowHeader' } ) ;
89
+ } ) ;
90
+ $timeout . flush ( ) ;
91
+
92
+
93
+ grid . columns [ 2 ] . renderContainer = 'left' ;
94
+ grid . columns [ 2 ] . sort = { priority : 1 } ;
95
+ grid . columns [ 2 ] . grouping = { groupPriority : 1 } ;
96
+ uiGridGroupingService . moveGroupColumns ( grid , grid . columns , grid . rows ) ;
97
+ expect ( grid . columns [ 0 ] . colDef . name ) . toBe ( 'aRowHeader' ) ;
98
+
99
+
100
+ } ) ;
82
101
} ) ;
83
102
84
103
0 commit comments