@@ -2,36 +2,35 @@ import { Component, DebugElement, OnInit, ViewChild } from '@angular/core';
2
2
import { TestBed , fakeAsync , tick , ComponentFixture } from '@angular/core/testing' ;
3
3
import { By } from '@angular/platform-browser' ;
4
4
import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
5
- import { IgxAvatarModule } from '../../avatar/avatar.component' ;
6
5
import { Calendar } from '../../calendar/public_api' ;
7
6
import { IgxGridComponent } from './grid.component' ;
8
- import { IgxGridModule , IColumnResizeEventArgs } from './public_api' ;
7
+ import { IColumnResizeEventArgs , IgxColumnComponent } from './public_api' ;
9
8
import { UIInteractions } from '../../test-utils/ui-interactions.spec' ;
10
9
import { GridTemplateStrings , ColumnDefinitions } from '../../test-utils/template-strings.spec' ;
11
10
import { SampleTestData } from '../../test-utils/sample-test-data.spec' ;
12
11
import { MultiColumnHeadersComponent } from '../../test-utils/grid-samples.spec' ;
13
12
import { configureTestSuite } from '../../test-utils/configure-suite' ;
14
13
import { GridFunctions } from '../../test-utils/grid-functions.spec' ;
14
+ import { IgxCellTemplateDirective } from '../columns/templates.directive' ;
15
+ import { NgFor } from '@angular/common' ;
15
16
16
17
describe ( 'IgxGrid - Deferred Column Resizing #grid' , ( ) => {
17
18
18
19
const COLUMN_HEADER_GROUP_CLASS = '.igx-grid-thead__item' ;
19
20
20
21
configureTestSuite ( ( ( ) => {
21
22
return TestBed . configureTestingModule ( {
22
- declarations : [ MultiColumnHeadersComponent ] ,
23
- imports : [
24
- IgxAvatarModule ,
25
- NoopAnimationsModule ,
26
- IgxGridModule ,
27
- ResizableColumnsComponent ,
28
- GridFeaturesComponent ,
29
- LargePinnedColGridComponent ,
30
- NullColumnsComponent ,
31
- ColGridComponent ,
32
- ColPercentageGridComponent
33
- ]
34
- } ) ;
23
+ imports : [
24
+ MultiColumnHeadersComponent ,
25
+ NoopAnimationsModule ,
26
+ ResizableColumnsComponent ,
27
+ GridFeaturesComponent ,
28
+ LargePinnedColGridComponent ,
29
+ NullColumnsComponent ,
30
+ ColGridComponent ,
31
+ ColPercentageGridComponent
32
+ ]
33
+ } ) ;
35
34
} ) ) ;
36
35
37
36
describe ( 'Base tests: ' , ( ) => {
@@ -870,8 +869,7 @@ describe('IgxGrid - Deferred Column Resizing #grid', () => {
870
869
@Component ( {
871
870
template : GridTemplateStrings . declareGrid ( `width="500px" height="300px"` , `` , ColumnDefinitions . resizableThreeOfFour ) ,
872
871
standalone : true ,
873
- imports : [ IgxAvatarModule ,
874
- IgxGridModule ]
872
+ imports : [ IgxGridComponent , IgxColumnComponent ]
875
873
} )
876
874
export class ResizableColumnsComponent {
877
875
@ViewChild ( IgxGridComponent , { static : true } ) public grid : IgxGridComponent ;
@@ -894,8 +892,7 @@ export class ResizableColumnsComponent {
894
892
<igx-column [field]="'Downloads'" width="100px" dataType="number" [resizable]="true"></igx-column>
895
893
<igx-column [field]="'Category'" width="100px" dataType="string" [resizable]="true"></igx-column>` ) ,
896
894
standalone : true ,
897
- imports : [ IgxAvatarModule ,
898
- IgxGridModule ]
895
+ imports : [ IgxGridComponent , IgxColumnComponent , IgxCellTemplateDirective ]
899
896
} )
900
897
export class LargePinnedColGridComponent implements OnInit {
901
898
@ViewChild ( IgxGridComponent , { static : true } ) public grid : IgxGridComponent ;
@@ -917,8 +914,7 @@ export class LargePinnedColGridComponent implements OnInit {
917
914
@Component ( {
918
915
template : GridTemplateStrings . declareGrid ( `` , `` , ColumnDefinitions . gridFeatures ) ,
919
916
standalone : true ,
920
- imports : [ IgxAvatarModule ,
921
- IgxGridModule ]
917
+ imports : [ IgxGridComponent , IgxColumnComponent , IgxCellTemplateDirective ]
922
918
} )
923
919
export class GridFeaturesComponent {
924
920
@ViewChild ( IgxGridComponent , { static : true } ) public grid : IgxGridComponent ;
@@ -932,8 +928,7 @@ export class GridFeaturesComponent {
932
928
@Component ( {
933
929
template : GridTemplateStrings . declareGrid ( `height="800px"` , `` , ColumnDefinitions . resizableColsComponent ) ,
934
930
standalone : true ,
935
- imports : [ IgxAvatarModule ,
936
- IgxGridModule ]
931
+ imports : [ IgxGridComponent , IgxColumnComponent , NgFor ]
937
932
} )
938
933
export class NullColumnsComponent implements OnInit {
939
934
@ViewChild ( IgxGridComponent , { static : true } ) public grid : IgxGridComponent ;
@@ -967,8 +962,7 @@ export class NullColumnsComponent implements OnInit {
967
962
<igx-column [field]="'Downloads'" width="300px" dataType="number" [resizable]="true"></igx-column>
968
963
<igx-column [field]="'Category'" width="300px" dataType="string" [resizable]="true"></igx-column>` ) ,
969
964
standalone : true ,
970
- imports : [ IgxAvatarModule ,
971
- IgxGridModule ]
965
+ imports : [ IgxGridComponent , IgxColumnComponent ]
972
966
} )
973
967
export class ColGridComponent implements OnInit {
974
968
@ViewChild ( IgxGridComponent , { static : true } ) public grid : IgxGridComponent ;
@@ -986,8 +980,7 @@ export class ColGridComponent implements OnInit {
986
980
<igx-column [field]="'ProductName'" [width]="'25%'" dataType="string" [filterable]="true"></igx-column>
987
981
<igx-column [field]="'Test'"[width]="'25%'" dataType="string" [resizable]="true"></igx-column>` ) ,
988
982
standalone : true ,
989
- imports : [ IgxAvatarModule ,
990
- IgxGridModule ]
983
+ imports : [ IgxGridComponent , IgxColumnComponent ]
991
984
} )
992
985
export class ColPercentageGridComponent implements OnInit {
993
986
@ViewChild ( IgxGridComponent , { static : true } ) public grid : IgxGridComponent ;
0 commit comments