Skip to content

Commit

Permalink
test(igxGrid): refactoring the custom sorting test #2734
Browse files Browse the repository at this point in the history
  • Loading branch information
PavlovVasil committed Nov 21, 2018
1 parent bd200a3 commit 5aee699
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ describe('IgxGrid - Grid Sorting', () => {

TestBed.configureTestingModule({
declarations: [
GridDeclaredColumnsComponent
GridDeclaredColumnsComponent,
SortByParityComponent
],
imports: [IgxGridModule.forRoot()]
})
Expand Down Expand Up @@ -316,16 +317,8 @@ describe('IgxGrid - Grid Sorting', () => {
fixture.detectChanges();
expect(sortingIcon.nativeElement.textContent.trim()).toEqual(SORTING_ICON_NONE_CONTENT);
});
});

describe('IgxGrid - Grid Custom Sorting', () => {
let fixture;
let grid: IgxGridComponent;
it(`Should allow sorting using a custom Sorting Strategy.`, () => {
TestBed.configureTestingModule({
declarations: [SortByParityComponent],
imports: [IgxGridModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(SortByParityComponent);
grid = fixture.componentInstance.grid;
fixture.componentInstance.data.push(
Expand All @@ -348,6 +341,7 @@ describe('IgxGrid - Grid Custom Sorting', () => {
expect(isFirstHalfOdd).toEqual(true);
expect(isSecondHalfEven).toEqual(true);
});

});

@Component({
Expand Down

0 comments on commit 5aee699

Please sign in to comment.