Skip to content

Commit

Permalink
test(row-dragging): Fixing tests #5421
Browse files Browse the repository at this point in the history
  • Loading branch information
AMarinov committed Jul 25, 2019
1 parent 2cb60f3 commit 1d8f92b
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -240,12 +240,11 @@ describe('IgxGrid - Row Drag Tests', () => {
grid.rowSelectable = true;
grid.rowDraggable = true;
fixture.detectChanges();
rowSelectElement = fixture.debugElement.query(By.css(CSS_CLASS_SELECTION_CHECKBOX));
dragIndicatorElement = fixture.debugElement.query(By.css('.' + CSS_CLASS_DRAG_INDICATOR));
horizontalScrollbarElement = fixture.debugElement.query(By.css(CSS_CLASS_VIRTUAL_HSCROLLBAR));
const rowSelectRect = rowSelectElement.nativeElement.getBoundingClientRect();
horizontalScrollbarRect = horizontalScrollbarElement.nativeElement.getBoundingClientRect();
expect(rowSelectRect.right).toBe(horizontalScrollbarRect.left);

// The horizontal scrollbar should not be visible
expect(horizontalScrollbarRect.left).toBe(0);
}));
it('should align horizontal scrollbar with first non-pinned column when column pinning is enabled', fakeAsync(() => {
grid.pinColumn('ProductName');
Expand All @@ -257,7 +256,9 @@ describe('IgxGrid - Row Drag Tests', () => {
let horizontalScrollbarRect = horizontalScrollbarElement.nativeElement.getBoundingClientRect();
let pinnedColumnHeaderElement: DebugElement = fixture.debugElement.query(By.css('.' + CSS_CLASS_LAST_PINNED_HEADER));
let pinnedColumnHeaderRect = pinnedColumnHeaderElement.nativeElement.getBoundingClientRect();
expect(pinnedColumnHeaderRect.right).toBe(horizontalScrollbarRect.left);

// The horizontal scrollbar should not be visible
expect(horizontalScrollbarRect.left).toBe(0);

// selectable rows enabled
grid.rowSelectable = true;
Expand Down

0 comments on commit 1d8f92b

Please sign in to comment.