11import { async , TestBed , fakeAsync } from '@angular/core/testing' ;
2- import { By } from '@angular/platform-browser' ;
32import { SortingDirection } from '../../data-operations/sorting-expression.interface' ;
43import { IgxGridComponent } from './grid.component' ;
54import { IgxGridModule } from './index' ;
65import { DefaultSortingStrategy , NoopSortingStrategy } from '../../data-operations/sorting-strategy' ;
76import { IgxGridCellComponent } from '../cell.component' ;
87import { configureTestSuite } from '../../test-utils/configure-suite' ;
9- import { IgxGridFilteringRowComponent } from '../filtering/base/grid-filtering-row.component' ;
10- import { IgxChipComponent } from '../../chips/chip.component' ;
118import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
129import { GridFunctions } from '../../test-utils/grid-functions.spec' ;
1310import { GridDeclaredColumnsComponent , SortByParityComponent } from '../../test-utils/grid-samples.spec' ;
14- import { ControlsFunction } from '../../test-utils/controls-functions.spec' ;
1511import { UIInteractions } from '../../test-utils/ui-interactions.spec' ;
1612
1713const SORTING_ICON_ASC_CONTENT = 'arrow_upward' ;
@@ -246,9 +242,8 @@ describe('IgxGrid - Grid Sorting #grid', () => {
246242 describe ( 'UI tests' , ( ) => {
247243
248244 it ( 'Should sort grid ascending by clicking once on first header cell UI' , ( ) => {
249- const firstHeaderCell = GridFunctions . getColumnHeader ( 'ID' , fixture ) ;
250245
251- GridFunctions . clickHeaderSortIcon ( firstHeaderCell ) ;
246+ GridFunctions . clickColumnHeaderUI ( 'ID' , fixture ) ;
252247 fixture . detectChanges ( ) ;
253248
254249 const firstRowFirstCell = getCurrentCellFromGrid ( grid , 0 , 0 ) ;
@@ -263,11 +258,10 @@ describe('IgxGrid - Grid Sorting #grid', () => {
263258 } ) ;
264259
265260 it ( 'Should sort grid descending by clicking twice on sort icon UI' , ( ) => {
266- const firstHeaderCell = GridFunctions . getColumnHeader ( 'ID' , fixture ) ;
267261
268- GridFunctions . clickHeaderSortIcon ( firstHeaderCell ) ;
262+ GridFunctions . clickColumnHeaderUI ( 'ID' , fixture ) ;
269263 fixture . detectChanges ( ) ;
270- GridFunctions . clickHeaderSortIcon ( firstHeaderCell ) ;
264+ GridFunctions . clickColumnHeaderUI ( 'ID' , fixture ) ;
271265 fixture . detectChanges ( ) ;
272266
273267 const firstRowFirstCell = getCurrentCellFromGrid ( grid , 0 , 0 ) ;
@@ -282,13 +276,12 @@ describe('IgxGrid - Grid Sorting #grid', () => {
282276 } ) ;
283277
284278 it ( 'Should sort grid none when we click three time on header sort icon UI' , ( ) => {
285- const firstHeaderCell = GridFunctions . getColumnHeader ( 'ID' , fixture ) ;
286279
287- GridFunctions . clickHeaderSortIcon ( firstHeaderCell ) ;
280+ GridFunctions . clickColumnHeaderUI ( 'ID' , fixture ) ;
288281 fixture . detectChanges ( ) ;
289- GridFunctions . clickHeaderSortIcon ( firstHeaderCell ) ;
282+ GridFunctions . clickColumnHeaderUI ( 'ID' , fixture ) ;
290283 fixture . detectChanges ( ) ;
291- GridFunctions . clickHeaderSortIcon ( firstHeaderCell ) ;
284+ GridFunctions . clickColumnHeaderUI ( 'ID' , fixture ) ;
292285 fixture . detectChanges ( ) ;
293286
294287 const firstRowSecondCell = getCurrentCellFromGrid ( grid , 0 , 1 ) ;
0 commit comments