@@ -54,7 +54,7 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
54
54
rowSelection : true ,
55
55
columnSelection : true ,
56
56
expansion : true ,
57
- inheritance : true
57
+ rowIslands : true
58
58
} ;
59
59
60
60
const state = fix . componentInstance . state ;
@@ -81,7 +81,7 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
81
81
rowSelection : true ,
82
82
columnSelection : true ,
83
83
expansion : true ,
84
- inheritance : false
84
+ rowIslands : false
85
85
} ;
86
86
87
87
const state = fix . componentInstance . state ;
@@ -150,7 +150,7 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
150
150
expect ( childGrid . state [ 'paging' ] ) . toBeFalsy ( ) ;
151
151
} ) ;
152
152
153
- gridState = state . getState ( false , [ 'filtering' , 'sorting' , 'paging' , 'inheritance ' ] ) as IGridState ;
153
+ gridState = state . getState ( false , [ 'filtering' , 'sorting' , 'paging' , 'rowIslands ' ] ) as IGridState ;
154
154
expect ( gridState [ 'sorting' ] ) . toBeFalsy ( ) ;
155
155
expect ( gridState [ 'paging' ] ) . toBeFalsy ( ) ;
156
156
} ) ;
@@ -162,10 +162,10 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
162
162
const emptyFiltering = '{"filteringOperands":[],"operator":0}' ;
163
163
const initialState = HelperFunctions . buildStateString ( grid , 'filtering' , emptyFiltering , emptyFiltering ) ;
164
164
165
- let gridState = state . getState ( true , [ 'filtering' , 'inheritance ' ] ) ;
165
+ let gridState = state . getState ( true , [ 'filtering' , 'rowIslands ' ] ) ;
166
166
expect ( gridState ) . toBe ( initialState ) ;
167
167
168
- gridState = state . getState ( false , [ 'filtering' , 'inheritance ' ] ) as IGridState ;
168
+ gridState = state . getState ( false , [ 'filtering' , 'rowIslands ' ] ) as IGridState ;
169
169
HelperFunctions . verifyFilteringExpressions ( filtering , gridState ) ;
170
170
} ) ;
171
171
@@ -181,17 +181,17 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
181
181
const filteringStateObject = JSON . parse ( filteringState ) as IGridState ;
182
182
filteringStateObject . columns = fix . componentInstance . childColumns ;
183
183
184
- let gridState = state . getState ( true , [ 'filtering' , 'inheritance ' ] ) ;
184
+ let gridState = state . getState ( true , [ 'filtering' , 'rowIslands ' ] ) ;
185
185
expect ( gridState ) . toBe ( initialState ) ;
186
186
187
187
state . setState ( JSON . stringify ( filteringStateObject ) ) ;
188
- gridState = state . getState ( false , [ 'filtering' , 'inheritance ' ] ) as IGridState ;
188
+ gridState = state . getState ( false , [ 'filtering' , 'rowIslands ' ] ) as IGridState ;
189
189
HelperFunctions . verifyFilteringExpressions ( grid . filteringExpressionsTree , gridState ) ;
190
190
const gridsCollection = HelperFunctions . getChildGridsCollection ( grid , gridState ) ;
191
191
gridsCollection . forEach ( childGrid => {
192
192
HelperFunctions . verifyFilteringExpressions ( childGrid . grid . filteringExpressionsTree , childGrid . state ) ;
193
193
} ) ;
194
- gridState = state . getState ( true , [ 'filtering' , 'inheritance ' ] ) ;
194
+ gridState = state . getState ( true , [ 'filtering' , 'rowIslands ' ] ) ;
195
195
expect ( gridState ) . toBe ( filteringState ) ;
196
196
} ) ;
197
197
@@ -207,17 +207,17 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
207
207
const filteringStateObject = JSON . parse ( filteringState ) as IGridState ;
208
208
filteringStateObject . columns = fix . componentInstance . childColumns ;
209
209
210
- let gridState = state . getState ( true , [ 'filtering' , 'inheritance ' ] ) ;
210
+ let gridState = state . getState ( true , [ 'filtering' , 'rowIslands ' ] ) ;
211
211
expect ( gridState ) . toBe ( initialState ) ;
212
212
213
213
state . setState ( filteringStateObject ) ;
214
- gridState = state . getState ( false , [ 'filtering' , 'inheritance ' ] ) as IGridState ;
214
+ gridState = state . getState ( false , [ 'filtering' , 'rowIslands ' ] ) as IGridState ;
215
215
HelperFunctions . verifyFilteringExpressions ( grid . filteringExpressionsTree , gridState ) ;
216
216
const gridsCollection = HelperFunctions . getChildGridsCollection ( grid , gridState ) ;
217
217
gridsCollection . forEach ( childGrid => {
218
218
HelperFunctions . verifyFilteringExpressions ( childGrid . grid . filteringExpressionsTree , childGrid . state ) ;
219
219
} ) ;
220
- gridState = state . getState ( true , [ 'filtering' , 'inheritance ' ] ) ;
220
+ gridState = state . getState ( true , [ 'filtering' , 'rowIslands ' ] ) ;
221
221
expect ( gridState ) . toBe ( filteringState ) ;
222
222
} ) ;
223
223
@@ -228,7 +228,7 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
228
228
const emptySorting = '[]' ;
229
229
let initialState = HelperFunctions . buildStateString ( grid , 'sorting' , emptySorting , emptySorting ) ;
230
230
231
- let gridState = state . getState ( true , [ 'sorting' , 'inheritance ' ] ) ;
231
+ let gridState = state . getState ( true , [ 'sorting' , 'rowIslands ' ] ) ;
232
232
expect ( gridState ) . toBe ( initialState ) ;
233
233
234
234
grid . sortingExpressions = [
@@ -240,17 +240,17 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
240
240
initialState = HelperFunctions . buildStateString ( grid , 'sorting' , sorting , emptySorting , emptySorting ) ;
241
241
const sortingState = HelperFunctions . buildStateString ( grid , 'sorting' , sorting , sorting ) ;
242
242
243
- gridState = state . getState ( true , [ 'sorting' , 'inheritance ' ] ) ;
243
+ gridState = state . getState ( true , [ 'sorting' , 'rowIslands ' ] ) ;
244
244
expect ( gridState ) . toBe ( initialState ) ;
245
245
246
246
state . setState ( sortingState ) ;
247
- gridState = state . getState ( false , [ 'sorting' , 'inheritance ' ] ) as IGridState ;
247
+ gridState = state . getState ( false , [ 'sorting' , 'rowIslands ' ] ) as IGridState ;
248
248
HelperFunctions . verifySortingExpressions ( grid . sortingExpressions , gridState ) ;
249
249
const gridsCollection = HelperFunctions . getChildGridsCollection ( grid , gridState ) ;
250
250
gridsCollection . forEach ( childGrid => {
251
251
HelperFunctions . verifySortingExpressions ( childGrid . grid . sortingExpressions , childGrid . state ) ;
252
252
} ) ;
253
- gridState = state . getState ( true , [ 'sorting' , 'inheritance ' ] ) ;
253
+ gridState = state . getState ( true , [ 'sorting' , 'rowIslands ' ] ) ;
254
254
expect ( gridState ) . toBe ( sortingState ) ;
255
255
} ) ;
256
256
@@ -267,17 +267,17 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
267
267
const sortingState = HelperFunctions . buildStateString ( grid , 'sorting' , sorting , sorting ) ;
268
268
const sortingStateObject = JSON . parse ( sortingState ) as IGridState ;
269
269
270
- let gridState = state . getState ( true , [ 'sorting' , 'inheritance ' ] ) ;
270
+ let gridState = state . getState ( true , [ 'sorting' , 'rowIslands ' ] ) ;
271
271
expect ( gridState ) . toBe ( initialState ) ;
272
272
273
273
state . setState ( sortingStateObject ) ;
274
- gridState = state . getState ( false , [ 'sorting' , 'inheritance ' ] ) ;
274
+ gridState = state . getState ( false , [ 'sorting' , 'rowIslands ' ] ) ;
275
275
HelperFunctions . verifySortingExpressions ( grid . sortingExpressions , gridState as IGridState ) ;
276
276
const gridsCollection = HelperFunctions . getChildGridsCollection ( grid , gridState ) ;
277
277
gridsCollection . forEach ( childGrid => {
278
278
HelperFunctions . verifySortingExpressions ( childGrid . grid . sortingExpressions , childGrid . state ) ;
279
279
} ) ;
280
- gridState = state . getState ( true , [ 'sorting' , 'inheritance ' ] ) ;
280
+ gridState = state . getState ( true , [ 'sorting' , 'rowIslands ' ] ) ;
281
281
expect ( gridState ) . toBe ( sortingState ) ;
282
282
} ) ;
283
283
@@ -287,17 +287,17 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
287
287
const initialState = '{"paging":{"index":0,"recordsPerPage":5,"metadata":{"countPages":4,"countRecords":20,"error":0}},"rowIslands":[{"id":"igx-row-island-childData","parentRowID":"0","state":{"paging":{"index":0,"recordsPerPage":5,"metadata":{"countPages":2,"countRecords":7,"error":0}},"rowIslands":[]}},{"id":"igx-row-island-childData","parentRowID":"1","state":{"paging":{"index":0,"recordsPerPage":5,"metadata":{"countPages":3,"countRecords":14,"error":0}},"rowIslands":[]}},{"id":"igx-row-island-childData","parentRowID":"2","state":{"paging":{"index":0,"recordsPerPage":5,"metadata":{"countPages":2,"countRecords":7,"error":0}},"rowIslands":[]}},{"id":"igx-row-island-childData","parentRowID":"3","state":{"paging":{"index":0,"recordsPerPage":5,"metadata":{"countPages":3,"countRecords":14,"error":0}},"rowIslands":[]}},{"id":"igx-row-island-childData","parentRowID":"4","state":{"paging":{"index":0,"recordsPerPage":5,"metadata":{"countPages":2,"countRecords":7,"error":0}},"rowIslands":[]}}]}' ;
288
288
const pagingState = '{"paging":{"index":0,"recordsPerPage":20,"metadata":{"countPages":1,"countRecords":20,"error":0}},"rowIslands":[{"id":"igx-row-island-childData","parentRowID":"0","state":{"paging":{"index":0,"recordsPerPage":20,"metadata":{"countPages":1,"countRecords":7,"error":0}},"rowIslands":[]}},{"id":"igx-row-island-childData","parentRowID":"1","state":{"paging":{"index":0,"recordsPerPage":20,"metadata":{"countPages":1,"countRecords":14,"error":0}},"rowIslands":[]}},{"id":"igx-row-island-childData","parentRowID":"2","state":{"paging":{"index":0,"recordsPerPage":20,"metadata":{"countPages":1,"countRecords":7,"error":0}},"rowIslands":[]}},{"id":"igx-row-island-childData","parentRowID":"3","state":{"paging":{"index":0,"recordsPerPage":20,"metadata":{"countPages":1,"countRecords":14,"error":0}},"rowIslands":[]}},{"id":"igx-row-island-childData","parentRowID":"4","state":{"paging":{"index":0,"recordsPerPage":20,"metadata":{"countPages":1,"countRecords":7,"error":0}},"rowIslands":[]}},{"id":"igx-row-island-childData","parentRowID":"5","state":{"paging":{"index":0,"recordsPerPage":5,"metadata":{"countPages":3,"countRecords":14,"error":0}},"rowIslands":[]}},{"id":"igx-row-island-childData","parentRowID":"6","state":{"paging":{"index":0,"recordsPerPage":5,"metadata":{"countPages":2,"countRecords":7,"error":0}},"rowIslands":[]}}]}' ;
289
289
290
- let gridState = state . getState ( true , [ 'paging' , 'inheritance ' ] ) ;
290
+ let gridState = state . getState ( true , [ 'paging' , 'rowIslands ' ] ) ;
291
291
expect ( gridState ) . toBe ( initialState ) ;
292
292
293
293
state . setState ( pagingState ) ;
294
- gridState = state . getState ( false , [ 'paging' , 'inheritance ' ] ) ;
294
+ gridState = state . getState ( false , [ 'paging' , 'rowIslands ' ] ) ;
295
295
HelperFunctions . verifyPaging ( grid . pagingState , gridState as IGridState ) ;
296
296
const gridsCollection = HelperFunctions . getChildGridsCollection ( grid , gridState ) ;
297
297
gridsCollection . forEach ( childGrid => {
298
298
HelperFunctions . verifyPaging ( childGrid . grid . pagingState , childGrid . state ) ;
299
299
} ) ;
300
- gridState = state . getState ( true , [ 'paging' , 'inheritance ' ] ) ;
300
+ gridState = state . getState ( true , [ 'paging' , 'rowIslands ' ] ) ;
301
301
expect ( gridState ) . toBe ( pagingState ) ;
302
302
} ) ;
303
303
@@ -309,18 +309,18 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
309
309
const filtering = '{"filteringOperands":[{"fieldName":"ProductName","condition":{"name":"contains","isUnary":false,"iconName":"contains"},"searchVal":"A0","ignoreCase":true},{"fieldName":"ID","condition":{"name":"lessThan","isUnary":false,"iconName":"less_than"},"searchVal":3,"ignoreCase":true}],"operator":0,"type":1}' ;
310
310
const filteringState = HelperFunctions . buildStateString ( grid , 'advancedFiltering' , filtering , filtering ) ;
311
311
312
- let gridState = state . getState ( true , [ 'advancedFiltering' , 'inheritance ' ] ) ;
312
+ let gridState = state . getState ( true , [ 'advancedFiltering' , 'rowIslands ' ] ) ;
313
313
expect ( gridState ) . toBe ( initialState ) ;
314
314
315
315
state . setState ( filteringState ) ;
316
- gridState = state . getState ( false , [ 'advancedFiltering' , 'inheritance ' ] ) as IGridState ;
316
+ gridState = state . getState ( false , [ 'advancedFiltering' , 'rowIslands ' ] ) as IGridState ;
317
317
HelperFunctions . verifyAdvancedFilteringExpressions ( grid . advancedFilteringExpressionsTree , gridState ) ;
318
318
const gridsCollection = HelperFunctions . getChildGridsCollection ( grid , gridState ) ;
319
319
gridsCollection . forEach ( childGrid => {
320
320
HelperFunctions . verifyAdvancedFilteringExpressions ( childGrid . grid . advancedFilteringExpressionsTree , childGrid . state ) ;
321
321
} ) ;
322
322
323
- gridState = state . getState ( true , [ 'advancedFiltering' , 'inheritance ' ] ) ;
323
+ gridState = state . getState ( true , [ 'advancedFiltering' , 'rowIslands ' ] ) ;
324
324
expect ( gridState ) . toBe ( filteringState ) ;
325
325
} ) ;
326
326
@@ -333,17 +333,17 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
333
333
const filteringState = HelperFunctions . buildStateString ( grid , 'advancedFiltering' , filtering , filtering ) ;
334
334
const filteringStateObject = JSON . parse ( filteringState ) as IGridState ;
335
335
336
- let gridState = state . getState ( true , [ 'advancedFiltering' , 'inheritance ' ] ) ;
336
+ let gridState = state . getState ( true , [ 'advancedFiltering' , 'rowIslands ' ] ) ;
337
337
expect ( gridState ) . toBe ( initialState ) ;
338
338
339
339
state . setState ( filteringStateObject ) ;
340
- gridState = state . getState ( false , [ 'advancedFiltering' , 'inheritance ' ] ) as IGridState ;
340
+ gridState = state . getState ( false , [ 'advancedFiltering' , 'rowIslands ' ] ) as IGridState ;
341
341
HelperFunctions . verifyAdvancedFilteringExpressions ( grid . advancedFilteringExpressionsTree , gridState ) ;
342
342
const gridsCollection = HelperFunctions . getChildGridsCollection ( grid , gridState ) ;
343
343
gridsCollection . forEach ( childGrid => {
344
344
HelperFunctions . verifyAdvancedFilteringExpressions ( childGrid . grid . advancedFilteringExpressionsTree , childGrid . state ) ;
345
345
} ) ;
346
- gridState = state . getState ( true , [ 'advancedFiltering' , 'inheritance ' ] ) ;
346
+ gridState = state . getState ( true , [ 'advancedFiltering' , 'rowIslands ' ] ) ;
347
347
expect ( gridState ) . toBe ( filteringState ) ;
348
348
} ) ;
349
349
@@ -356,17 +356,17 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
356
356
const cellSelection = '[{"rowStart":0,"rowEnd":2,"columnStart":1,"columnEnd":3}]' ;
357
357
const cellSelectionState = HelperFunctions . buildStateString ( grid , 'cellSelection' , cellSelection , cellSelection ) ;
358
358
359
- let gridState = state . getState ( true , [ 'cellSelection' , 'inheritance ' ] ) ;
359
+ let gridState = state . getState ( true , [ 'cellSelection' , 'rowIslands ' ] ) ;
360
360
expect ( gridState ) . toBe ( initialState ) ;
361
361
362
362
state . setState ( cellSelectionState ) ;
363
- gridState = state . getState ( false , [ 'cellSelection' , 'inheritance ' ] ) ;
363
+ gridState = state . getState ( false , [ 'cellSelection' , 'rowIslands ' ] ) ;
364
364
HelperFunctions . verifyCellSelection ( grid . getSelectedRanges ( ) , gridState as IGridState ) ;
365
365
const gridsCollection = HelperFunctions . getChildGridsCollection ( grid , gridState ) ;
366
366
gridsCollection . forEach ( childGrid => {
367
367
HelperFunctions . verifyCellSelection ( childGrid . grid . getSelectedRanges ( ) , childGrid . state ) ;
368
368
} ) ;
369
- gridState = state . getState ( true , [ 'cellSelection' , 'inheritance ' ] ) ;
369
+ gridState = state . getState ( true , [ 'cellSelection' , 'rowIslands ' ] ) ;
370
370
expect ( gridState ) . toBe ( cellSelectionState ) ;
371
371
} ) ;
372
372
@@ -379,17 +379,17 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
379
379
const childRowSelection = '["00","01"]' ;
380
380
const rowSelectionState = HelperFunctions . buildStateString ( grid , 'rowSelection' , rowSelection , childRowSelection ) ;
381
381
382
- let gridState = state . getState ( true , [ 'rowSelection' , 'inheritance ' ] ) ;
382
+ let gridState = state . getState ( true , [ 'rowSelection' , 'rowIslands ' ] ) ;
383
383
expect ( gridState ) . toBe ( initialState ) ;
384
384
385
385
state . setState ( rowSelectionState ) ;
386
- gridState = state . getState ( false , [ 'rowSelection' , 'inheritance ' ] ) ;
386
+ gridState = state . getState ( false , [ 'rowSelection' , 'rowIslands ' ] ) ;
387
387
HelperFunctions . verifyRowSelection ( grid . selectedRows ( ) , gridState as IGridState ) ;
388
388
const gridsCollection = HelperFunctions . getChildGridsCollection ( grid , gridState ) ;
389
389
gridsCollection . forEach ( childGrid => {
390
390
HelperFunctions . verifyRowSelection ( childGrid . grid . selectedRows ( ) , childGrid . state ) ;
391
391
} ) ;
392
- gridState = state . getState ( true , [ 'rowSelection' , 'inheritance ' ] ) ;
392
+ gridState = state . getState ( true , [ 'rowSelection' , 'rowIslands ' ] ) ;
393
393
expect ( gridState ) . toBe ( rowSelectionState ) ;
394
394
} ) ;
395
395
@@ -405,18 +405,18 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
405
405
const childExpansion = '[["00",true]]' ;
406
406
let expansionState = HelperFunctions . buildStateString ( grid , 'expansion' , expansion , childExpansion , emptyExpansionState ) ;
407
407
408
- let gridState = state . getState ( true , [ 'expansion' , 'inheritance ' ] ) ;
408
+ let gridState = state . getState ( true , [ 'expansion' , 'rowIslands ' ] ) ;
409
409
expect ( gridState ) . toBe ( initialState ) ;
410
410
411
411
state . setState ( expansionState ) ;
412
412
expansionState = HelperFunctions . buildStateString ( grid , 'expansion' , expansion , childExpansion , emptyExpansionState ) ;
413
- gridState = state . getState ( false , [ 'expansion' , 'inheritance ' ] ) ;
413
+ gridState = state . getState ( false , [ 'expansion' , 'rowIslands ' ] ) ;
414
414
HelperFunctions . verifyExpansionStates ( grid . expansionStates , gridState as IGridState ) ;
415
415
const gridsCollection = HelperFunctions . getChildGridsCollection ( grid , gridState ) ;
416
416
gridsCollection . forEach ( childGrid => {
417
417
HelperFunctions . verifyExpansionStates ( childGrid . grid . expansionStates , childGrid . state ) ;
418
418
} ) ;
419
- gridState = state . getState ( true , [ 'expansion' , 'inheritance ' ] ) ;
419
+ gridState = state . getState ( true , [ 'expansion' , 'rowIslands ' ] ) ;
420
420
expect ( gridState ) . toBe ( expansionState ) ;
421
421
} ) ;
422
422
@@ -430,20 +430,20 @@ describe('IgxHierarchicalGridState - input properties #hGrid', () => {
430
430
const newColumns = '[{"pinned":false,"sortable":true,"filterable":false,"editable":true,"sortingIgnoreCase":true,"filteringIgnoreCase":true,"headerClasses":"","headerGroupClasses":"","groupable":false,"movable":false,"hidden":false,"dataType":"string","hasSummary":false,"field":"ProductName","width":"363px","header":"Product Name","resizable":false,"searchable":true},{"pinned":false,"sortable":false,"filterable":true,"editable":false,"sortingIgnoreCase":true,"filteringIgnoreCase":true,"headerClasses":"","headerGroupClasses":"","groupable":false,"movable":false,"hidden":false,"dataType":"number","hasSummary":false,"field":"ID","width":"363px","header":"ID","resizable":false,"searchable":true}]' ;
431
431
const newColumnsState = HelperFunctions . buildStateString ( grid , 'columns' , newColumns , newColumns ) ;
432
432
433
- let gridState = state . getState ( true , [ 'columns' , 'inheritance ' ] ) ;
433
+ let gridState = state . getState ( true , [ 'columns' , 'rowIslands ' ] ) ;
434
434
expect ( gridState ) . toBe ( initialState ) ;
435
435
436
436
state . setState ( newColumnsState ) ;
437
437
await wait ( ) ;
438
438
fix . detectChanges ( ) ;
439
439
440
- gridState = state . getState ( false , [ 'columns' , 'inheritance ' ] ) as IGridState ;
440
+ gridState = state . getState ( false , [ 'columns' , 'rowIslands ' ] ) as IGridState ;
441
441
HelperFunctions . verifyColumns ( JSON . parse ( newColumnsState ) . columns , gridState ) ;
442
442
// const gridsCollection = HelperFunctions.getChildGridsCollection(grid, gridState);
443
443
// gridsCollection.forEach(childGrid => {
444
444
// HelperFunctions.verifyColumns(childGrid.grid.columns, childGrid.state);
445
445
// });
446
- // gridState = state.getState(true, ['columns', 'inheritance ']);
446
+ // gridState = state.getState(true, ['columns', 'rowIslands ']);
447
447
// expect(gridState).toBe(newColumnsState);
448
448
} ) ;
449
449
} ) ;
0 commit comments