@@ -18,6 +18,7 @@ import { UIInteractions, wait } from '../../test-utils/ui-interactions.spec';
18
18
import { configureTestSuite } from '../../test-utils/configure-suite' ;
19
19
import { IgxGridComponent } from './grid.component' ;
20
20
import { HelperUtils } from '../../test-utils/helper-utils.spec' ;
21
+ import { GridSelectionFunctions } from '../../test-utils/grid-functions.spec' ;
21
22
22
23
describe ( 'IgxGrid - Column Moving #grid' , ( ) => {
23
24
configureTestSuite ( ) ;
@@ -686,7 +687,7 @@ describe('IgxGrid - Column Moving #grid', () => {
686
687
fixture . detectChanges ( ) ;
687
688
expect ( cell . selected ) . toBeTruthy ( ) ;
688
689
689
- HelperUtils . verifySelectedRange ( grid , 0 , 0 , 0 , 0 ) ;
690
+ GridSelectionFunctions . verifySelectedRange ( grid , 0 , 0 , 0 , 0 ) ;
690
691
691
692
// step 2 - reorder that column among columns that are currently out of view
692
693
// and verify selection is preserved
@@ -705,7 +706,7 @@ describe('IgxGrid - Column Moving #grid', () => {
705
706
await wait ( ) ;
706
707
fixture . detectChanges ( ) ;
707
708
708
- HelperUtils . verifySelectedRange ( grid , 0 , 0 , 0 , 0 ) ;
709
+ GridSelectionFunctions . verifySelectedRange ( grid , 0 , 0 , 0 , 0 ) ;
709
710
} ) ) ;
710
711
711
712
it ( 'Should preserve cell selection after columns are reordered - vertical scrolling.' , ( async ( ) => {
@@ -725,7 +726,7 @@ describe('IgxGrid - Column Moving #grid', () => {
725
726
fixture . detectChanges ( ) ;
726
727
727
728
expect ( cell . selected ) . toBeTruthy ( ) ;
728
- HelperUtils . verifySelectedRange ( grid , 25 , 25 , 9 , 9 ) ;
729
+ GridSelectionFunctions . verifySelectedRange ( grid , 25 , 25 , 9 , 9 ) ;
729
730
expect ( grid . getSelectedData ( ) ) . toEqual ( selectedData ) ;
730
731
731
732
// step 3 - scroll up vertically so that the selected cell becomes out of view
@@ -755,7 +756,7 @@ describe('IgxGrid - Column Moving #grid', () => {
755
756
fixture . detectChanges ( ) ;
756
757
757
758
const newSelectedData = [ { Country : 'France' } ] ;
758
- HelperUtils . verifySelectedRange ( grid , 25 , 25 , 9 , 9 ) ;
759
+ GridSelectionFunctions . verifySelectedRange ( grid , 25 , 25 , 9 , 9 ) ;
759
760
expect ( grid . getSelectedData ( ) ) . toEqual ( newSelectedData ) ;
760
761
} ) ) ;
761
762
@@ -1296,7 +1297,7 @@ describe('IgxGrid - Column Moving #grid', () => {
1296
1297
UIInteractions . simulateClickAndSelectCellEvent ( cell ) ;
1297
1298
fixture . detectChanges ( ) ;
1298
1299
1299
- HelperUtils . verifySelectedRange ( grid , 0 , 0 , 2 , 2 ) ;
1300
+ GridSelectionFunctions . verifySelectedRange ( grid , 0 , 0 , 2 , 2 ) ;
1300
1301
1301
1302
// step 2 - reorder the parent column and verify selection is preserved
1302
1303
const header = fixture . debugElement . queryAll ( By . css ( COLUMN_GROUP_HEADER_CLASS ) ) [ 0 ] . nativeElement ;
@@ -1310,7 +1311,7 @@ describe('IgxGrid - Column Moving #grid', () => {
1310
1311
await wait ( ) ;
1311
1312
fixture . detectChanges ( ) ;
1312
1313
1313
- HelperUtils . verifySelectedRange ( grid , 0 , 0 , 2 , 2 ) ;
1314
+ GridSelectionFunctions . verifySelectedRange ( grid , 0 , 0 , 2 , 2 ) ;
1314
1315
expect ( grid . getSelectedData ( ) ) . toEqual ( [ { CompanyName : 'Alfreds Futterkiste' } ] ) ;
1315
1316
1316
1317
// step 3 - navigate right and verify cell selection is updated
@@ -1319,7 +1320,7 @@ describe('IgxGrid - Column Moving #grid', () => {
1319
1320
await wait ( 50 ) ;
1320
1321
fixture . detectChanges ( ) ;
1321
1322
1322
- HelperUtils . verifySelectedRange ( grid , 0 , 0 , 3 , 3 ) ;
1323
+ GridSelectionFunctions . verifySelectedRange ( grid , 0 , 0 , 3 , 3 ) ;
1323
1324
expect ( grid . getSelectedData ( ) ) . toEqual ( [ { ContactName : 'Maria Anders' } ] ) ;
1324
1325
} ) ) ;
1325
1326
0 commit comments