Skip to content

Commit 1625a15

Browse files
committed
chore(*): reworking cg and cm tests
1 parent 44affb3 commit 1625a15

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

projects/igniteui-angular/src/lib/grids/grid/column-group.spec.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { IgxColumnGroupComponent } from '../columns/column-group.component';
77
import { By } from '@angular/platform-browser';
88
import { DefaultSortingStrategy, SortingDirection } from '../../data-operations/sorting-strategy';
99
import { IgxStringFilteringOperand } from '../../data-operations/filtering-condition';
10-
import { configureTestSuite } from '../../test-utils/configure-suite';
1110
import { IgxGridHeaderComponent } from '../headers/grid-header.component';
1211
import { GridSummaryFunctions, GridFunctions } from '../../test-utils/grid-functions.spec';
1312
import { wait } from '../../test-utils/ui-interactions.spec';
@@ -28,11 +27,11 @@ const GRID_COL_GROUP_THEAD_GROUP_CLASS = 'igx-grid-thead__group';
2827

2928

3029
describe('IgxGrid - multi-column headers #grid', () => {
31-
let fixture: ComponentFixture<any>; let grid: IgxGridComponent; let componentInstance;
30+
let fixture: ComponentFixture<any>;
31+
let grid: IgxGridComponent;
32+
let componentInstance;
3233

33-
configureTestSuite();
34-
35-
beforeAll(waitForAsync(() => {
34+
beforeEach(waitForAsync(() => {
3635
TestBed.configureTestingModule({
3736
imports: [
3837
NoopAnimationsModule,

projects/igniteui-angular/src/lib/grids/grid/column-moving.spec.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ describe('IgxGrid - Column Moving #grid', () => {
4141
describe('', () => {
4242
beforeEach(() => {
4343
fixture = TestBed.createComponent(MovableColumnsComponent);
44-
fixture.detectChanges();
4544
grid = fixture.componentInstance.grid;
46-
grid.moving = true;
45+
fixture.detectChanges();
4746
});
4847

4948
it('Should be able to reorder columns.', fakeAsync(() => {
@@ -717,9 +716,8 @@ describe('IgxGrid - Column Moving #grid', () => {
717716
describe('', () => {
718717
beforeEach(() => {
719718
fixture = TestBed.createComponent(MovableTemplatedColumnsComponent);
720-
fixture.detectChanges();
721719
grid = fixture.componentInstance.grid;
722-
grid.moving = true;
720+
fixture.detectChanges();
723721
});
724722

725723
it('Should reorder movable columns with templated headers.', (async () => {
@@ -753,9 +751,8 @@ describe('IgxGrid - Column Moving #grid', () => {
753751
describe('', () => {
754752
beforeEach(() => {
755753
fixture = TestBed.createComponent(MovableColumnsLargeComponent);
756-
fixture.detectChanges();
757754
grid = fixture.componentInstance.grid;
758-
grid.moving = true;
755+
fixture.detectChanges();
759756
});
760757

761758
it('Should be able to scroll forwards to reorder columns that are out of view.', (async () => {
@@ -1386,9 +1383,9 @@ describe('IgxGrid - Column Moving #grid', () => {
13861383
describe('', () => {
13871384
beforeEach(() => {
13881385
fixture = TestBed.createComponent(MultiColumnHeadersComponent);
1389-
fixture.detectChanges();
13901386
grid = fixture.componentInstance.grid;
13911387
grid.moving = true;
1388+
fixture.detectChanges();
13921389
});
13931390

13941391
it('MCH - should reorder only columns on the same level (top level simple column).', (async () => {
@@ -1880,7 +1877,7 @@ describe('IgxGrid - Column Moving #grid', () => {
18801877
expect(columnsList[4].field).toEqual('Missing');
18811878
}));
18821879

1883-
it('MCH - should not break selection and keyboard navigation when reordering columns.', (async () => {
1880+
it('MCH - should not break selection and keyboard navigation when reordering columns.', async () => {
18841881

18851882
// step 1 - select a cell from 'ContactName' column
18861883
const cell = grid.gridAPI.get_cell_by_index(0, 'ContactName');
@@ -1913,7 +1910,7 @@ describe('IgxGrid - Column Moving #grid', () => {
19131910

19141911
GridSelectionFunctions.verifySelectedRange(grid, 0, 0, 3, 3);
19151912
expect(grid.getSelectedData()).toEqual([{ContactName: 'Maria Anders' }]);
1916-
}));
1913+
});
19171914

19181915
it('MCH - should pin only top level columns.', (async () => {
19191916
fixture.componentInstance.isPinned = true;

0 commit comments

Comments
 (0)