@@ -77,14 +77,15 @@ describe('Row Pinning #grid', () => {
77
77
// pin 2nd
78
78
grid . pinRow ( fix . componentInstance . data [ 1 ] ) ;
79
79
fix . detectChanges ( ) ;
80
-
80
+
81
81
expect ( grid . pinnedRecords . length ) . toBe ( 1 ) ;
82
82
let pinRowContainer = fix . debugElement . queryAll ( By . css ( FIXED_ROW_CONTAINER ) ) ;
83
83
expect ( pinRowContainer . length ) . toBe ( 1 ) ;
84
84
expect ( pinRowContainer [ 0 ] . children . length ) . toBe ( 1 ) ;
85
85
expect ( pinRowContainer [ 0 ] . children [ 0 ] . context . rowID ) . toBe ( fix . componentInstance . data [ 1 ] ) ;
86
86
expect ( pinRowContainer [ 0 ] . children [ 0 ] . context . index ) . toBe ( fix . componentInstance . data . length - 1 ) ;
87
- expect ( pinRowContainer [ 0 ] . children [ 0 ] . nativeElement ) . toBe ( grid . getRowByIndex ( fix . componentInstance . data . length - 1 ) . nativeElement ) ;
87
+ expect ( pinRowContainer [ 0 ] . children [ 0 ] . nativeElement )
88
+ . toBe ( grid . getRowByIndex ( fix . componentInstance . data . length - 1 ) . nativeElement ) ;
88
89
89
90
expect ( grid . getRowByIndex ( 0 ) . rowID ) . toBe ( fix . componentInstance . data [ 0 ] ) ;
90
91
expect ( grid . getRowByIndex ( 1 ) . rowID ) . toBe ( fix . componentInstance . data [ 2 ] ) ;
@@ -136,7 +137,7 @@ describe('Row Pinning #grid', () => {
136
137
// pin 2nd row
137
138
grid . pinRow ( fix . componentInstance . data [ 1 ] ) ;
138
139
fix . detectChanges ( ) ;
139
-
140
+
140
141
expect ( grid . pinnedRecords . length ) . toBe ( 1 ) ;
141
142
let pinRowContainer = fix . debugElement . queryAll ( By . css ( FIXED_ROW_CONTAINER ) ) ;
142
143
expect ( pinRowContainer . length ) . toBe ( 1 ) ;
@@ -154,7 +155,7 @@ describe('Row Pinning #grid', () => {
154
155
155
156
expect ( grid . pinnedRecords . length ) . toBe ( 0 ) ;
156
157
pinRowContainer = fix . debugElement . queryAll ( By . css ( FIXED_ROW_CONTAINER ) ) ;
157
- expect ( pinRowContainer . length ) . toBe ( 0 ) ;
158
+ expect ( pinRowContainer . length ) . toBe ( 0 ) ;
158
159
159
160
expect ( grid . getRowByIndex ( 0 ) . rowID ) . toBe ( fix . componentInstance . data [ 0 ] ) ;
160
161
expect ( grid . getRowByIndex ( 1 ) . rowID ) . toBe ( fix . componentInstance . data [ 1 ] ) ;
@@ -182,7 +183,7 @@ describe('Row Pinning #grid', () => {
182
183
183
184
expect ( grid . pinnedRecords . length ) . toBe ( 0 ) ;
184
185
pinRowContainer = fix . debugElement . queryAll ( By . css ( FIXED_ROW_CONTAINER ) ) ;
185
- expect ( pinRowContainer . length ) . toBe ( 0 ) ;
186
+ expect ( pinRowContainer . length ) . toBe ( 0 ) ;
186
187
187
188
expect ( grid . getRowByIndex ( 0 ) . rowID ) . toBe ( fix . componentInstance . data [ 0 ] ) ;
188
189
expect ( grid . getRowByIndex ( 1 ) . rowID ) . toBe ( fix . componentInstance . data [ 1 ] ) ;
@@ -193,25 +194,25 @@ describe('Row Pinning #grid', () => {
193
194
let row = grid . getRowByIndex ( 1 ) ;
194
195
row . pinned = true ;
195
196
fix . detectChanges ( ) ;
196
-
197
+
197
198
expect ( grid . pinnedRecords . length ) . toBe ( 1 ) ;
198
199
let pinRowContainer = fix . debugElement . queryAll ( By . css ( FIXED_ROW_CONTAINER ) ) ;
199
200
expect ( pinRowContainer . length ) . toBe ( 1 ) ;
200
201
expect ( pinRowContainer [ 0 ] . children . length ) . toBe ( 1 ) ;
201
202
expect ( pinRowContainer [ 0 ] . children [ 0 ] . context . rowID ) . toBe ( fix . componentInstance . data [ 1 ] ) ;
202
-
203
+
203
204
expect ( grid . getRowByIndex ( 0 ) . rowID ) . toBe ( fix . componentInstance . data [ 1 ] ) ;
204
205
expect ( grid . getRowByIndex ( 1 ) . rowID ) . toBe ( fix . componentInstance . data [ 0 ] ) ;
205
-
206
+
206
207
// unpin
207
208
row = grid . getRowByIndex ( 0 ) ;
208
209
row . pinned = false ;
209
210
fix . detectChanges ( ) ;
210
-
211
+
211
212
expect ( grid . pinnedRecords . length ) . toBe ( 0 ) ;
212
213
pinRowContainer = fix . debugElement . queryAll ( By . css ( FIXED_ROW_CONTAINER ) ) ;
213
- expect ( pinRowContainer . length ) . toBe ( 0 ) ;
214
-
214
+ expect ( pinRowContainer . length ) . toBe ( 0 ) ;
215
+
215
216
expect ( grid . getRowByIndex ( 0 ) . rowID ) . toBe ( fix . componentInstance . data [ 0 ] ) ;
216
217
expect ( grid . getRowByIndex ( 1 ) . rowID ) . toBe ( fix . componentInstance . data [ 1 ] ) ;
217
218
} ) ;
0 commit comments