Skip to content

Commit d8f7fb7

Browse files
committed
chore(*): fix failing tests
1 parent d88e584 commit d8f7fb7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,12 +788,14 @@ describe('Basic IgxPivotGrid #pivotGrid', () => {
788788
expect(pivotGrid.pivotConfiguration.values.map(x => x.member)).toEqual(['UnitPrice', 'UnitsSold']);
789789

790790
});
791-
it('should allow moving dimension between rows, columns and filters.', () => {
791+
fit('should allow moving dimension between rows, columns and filters.', () => {
792792
const pivotGrid = fixture.componentInstance.pivotGrid;
793793
pivotGrid.pivotConfiguration.filters = [{
794794
memberName: 'SellerName',
795795
enabled: true
796796
}];
797+
pivotGrid.pipeTrigger++;
798+
pivotGrid.setupColumns();
797799
fixture.detectChanges();
798800
const headerRow: IgxPivotHeaderRowComponent = fixture.debugElement.query(By.directive(IgxPivotHeaderRowComponent)).componentInstance;
799801
const chipAreas = fixture.debugElement.queryAll(By.directive(IgxChipsAreaComponent));
@@ -803,6 +805,7 @@ describe('Basic IgxPivotGrid #pivotGrid', () => {
803805
const filterChip = filterChipArea.chipsList.first;
804806
// start drag in filter chip area.
805807
headerRow.onDimDragStart({}, filterChipArea);
808+
// pivotGrid.pipeTrigger++;
806809
fixture.detectChanges();
807810

808811
// check drop here chips are displayed in other areas
@@ -817,6 +820,8 @@ describe('Basic IgxPivotGrid #pivotGrid', () => {
817820
dragChip: filterChip,
818821
owner: dropHereRowChip
819822
}, rowChipArea, PivotDimensionType.Row);
823+
// pivotGrid.pipeTrigger++;
824+
fixture.detectChanges();
820825
pivotGrid.cdr.detectChanges();
821826

822827
// check dimensions
@@ -827,6 +832,7 @@ describe('Basic IgxPivotGrid #pivotGrid', () => {
827832
const colChip = colChipArea.chipsList.first;
828833
// start drag in row chip area.
829834
headerRow.onDimDragStart({}, rowChipArea);
835+
// pivotGrid.pipeTrigger++;
830836
fixture.detectChanges();
831837

832838
// drag Seller from row dimension as first chip in columns
@@ -837,6 +843,7 @@ describe('Basic IgxPivotGrid #pivotGrid', () => {
837843
offsetX: 0
838844
}
839845
}, PivotDimensionType.Column);
846+
// pivotGrid.pipeTrigger++;
840847
fixture.detectChanges();
841848
//check drop indicator between chips
842849
expect((colChip.nativeElement.previousElementSibling as any).style.visibility).toBe('');
@@ -847,7 +854,9 @@ describe('Basic IgxPivotGrid #pivotGrid', () => {
847854
dragChip: rowSellerChip,
848855
owner: colChip
849856
}, colChipArea, PivotDimensionType.Column);
857+
// pivotGrid.pipeTrigger++;
850858
pivotGrid.cdr.detectChanges();
859+
fixture.detectChanges();
851860

852861
// check dimensions
853862
expect(pivotGrid.pivotConfiguration.filters.filter(x => x.enabled).length).toBe(0);
@@ -864,6 +873,8 @@ describe('Basic IgxPivotGrid #pivotGrid', () => {
864873
owner: {}
865874
}, filterChipArea, PivotDimensionType.Filter);
866875
pivotGrid.cdr.detectChanges();
876+
pivotGrid.pipeTrigger++;
877+
fixture.detectChanges();
867878

868879
expect(pivotGrid.pivotConfiguration.filters.filter(x => x.enabled).length).toBe(1);
869880
expect(pivotGrid.pivotConfiguration.rows.filter(x => x.enabled).length).toBe(1);

0 commit comments

Comments
 (0)