Skip to content

Commit 31a482b

Browse files
committed
chore(*): fix linting errors
1 parent e9a9c92 commit 31a482b

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

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

+18-14
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { IgxTabsComponent, IgxTabsModule } from '../../tabs/tabs/public_api';
2626
import { IgxGridRowComponent } from './grid-row.component';
2727

2828

29-
describe('IgxGrid Component Tests #grid', () => {
29+
fdescribe('IgxGrid Component Tests #grid', () => {
3030
const MIN_COL_WIDTH = '136px';
3131
const COLUMN_HEADER_CLASS = '.igx-grid__th';
3232

@@ -2114,9 +2114,13 @@ describe('IgxGrid Component Tests #grid', () => {
21142114
const fix = TestBed.createComponent(IgxGridWrappedInContComponent);
21152115
const grid = fix.componentInstance.grid;
21162116
fix.componentInstance.data = fix.componentInstance.fullData;
2117+
fix.detectChanges();
2118+
tick(16);
21172119
fix.componentInstance.paging = true;
21182120
fix.detectChanges();
21192121
tick(16);
2122+
grid.notifyChanges(true);
2123+
fix.detectChanges();
21202124

21212125
// Compare the result returned by both get_row_by_index and getRowByIndex
21222126
expect(grid.gridAPI.get_row_by_index(fix.componentInstance.pageSize + 1)).toBeUndefined();
@@ -2195,7 +2199,6 @@ describe('IgxGrid Component Tests #grid', () => {
21952199
});
21962200

21972201
it('IgxTabs: should initialize a grid with correct height when paging and summaries are enabled', async () => {
2198-
21992202
const grid = fix.componentInstance.grid4;
22002203
const tab = fix.componentInstance.tabs;
22012204
tab.items.toArray()[3].selected = true;
@@ -2327,7 +2330,7 @@ describe('IgxGrid Component Tests #grid', () => {
23272330
});
23282331
}));
23292332

2330-
it('should have access to grid context', () => {
2333+
fit('should have access to grid context', () => {
23312334
const fix = TestBed.createComponent(IgxGridWithCustomPaginationTemplateComponent);
23322335
fix.detectChanges();
23332336

@@ -2711,8 +2714,8 @@ export class IgxGridWithCustomFooterComponent extends IgxGridTestComponent {
27112714
@Component({
27122715
template:
27132716
`<div [style.width.px]="outerWidth" [style.height.px]="outerHeight">
2714-
<igx-grid #grid [data]="data" [displayDensity]="density" [autoGenerate]="true"
2715-
[paging]="paging" [perPage]="pageSize">
2717+
<igx-grid #grid [data]="data" [displayDensity]="density" [autoGenerate]="true">
2718+
<igx-paginator *ngIf="paging" [perPage]="pageSize"></igx-paginator>
27162719
</igx-grid>
27172720
</div>`
27182721
})
@@ -2985,15 +2988,15 @@ export class IgxGridFormattingComponent extends BasicGridComponent {
29852988
<span igxTabHeaderLabel>Tab 4</span>
29862989
</igx-tab-header>
29872990
<igx-tab-content>
2988-
<igx-grid #grid4 [data]="data" [primaryKey]="'id'" [width]="'500px'" [height]="'300px'"
2989-
[paging]="true" [perPage]="3">
2991+
<igx-grid #grid4 [data]="data" [primaryKey]="'id'" [width]="'500px'" [height]="'300px'">
29902992
<igx-column
29912993
*ngFor="let column of columns"
29922994
[field]="column.field"
29932995
[header]="column.field"
29942996
[hasSummary]="true"
29952997
>
29962998
</igx-column>
2999+
<igx-paginator [perPage]="3"></igx-paginator>
29973000
</igx-grid>
29983001
</igx-tab-content>
29993002
</igx-tab-item>
@@ -3002,14 +3005,14 @@ export class IgxGridFormattingComponent extends BasicGridComponent {
30023005
<span igxTabHeaderLabel>Tab 5</span>
30033006
</igx-tab-header>
30043007
<igx-tab-content>
3005-
<igx-grid #grid5 [data]="data" [primaryKey]="'id'" [width]="'500px'" [height]="'100%'"
3006-
[paging]="true" [perPage]="4">
3008+
<igx-grid #grid5 [data]="data" [primaryKey]="'id'" [width]="'500px'" [height]="'100%'">
30073009
<igx-column
30083010
*ngFor="let column of columns"
30093011
[field]="column.field"
30103012
[header]="column.field"
30113013
>
30123014
</igx-column>
3015+
<igx-paginator [perPage]="4"></igx-paginator>
30133016
</igx-grid>
30143017
</igx-tab-content>
30153018
</igx-tab-item>
@@ -3074,12 +3077,13 @@ export class IgxGridInsideIgxTabsComponent {
30743077

30753078
@Component({
30763079
template: `
3077-
<igx-grid #grid [data]="data"
3078-
[paging]="true" [paginationTemplate]="pager" [autoGenerate]="true">
3080+
<igx-grid #grid [data]="data" [autoGenerate]="true">
3081+
<igx-paginator>
3082+
<igx-paginator-content *ngIf="grid.rendered">
3083+
<h2>{{grid.totalRecords}}</h2>
3084+
</igx-paginator-content>
3085+
</igx-paginator>
30793086
</igx-grid>
3080-
<ng-template #pager let-grid>
3081-
<h2>{{grid.totalRecords}}</h2>
3082-
</ng-template>
30833087
`
30843088
})
30853089
export class IgxGridWithCustomPaginationTemplateComponent {

0 commit comments

Comments
 (0)