Skip to content

Commit 3c919b2

Browse files
committed
chore(*): Add additional check for the headers
1 parent 7998165 commit 3c919b2

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

projects/igniteui-angular/grids/tree-grid/src/tree-grid-integration.spec.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,20 +132,22 @@ describe('IgxTreeGrid - Integration #tGrid', () => {
132132
const header = TreeGridFunctions.getHeaderCell(fix, 'ID').nativeElement;
133133
UIInteractions.simulatePointerEvent('pointerdown', header, 50, 35);
134134
fix.detectChanges();
135-
await wait(100);
135+
await wait();
136136

137137
UIInteractions.simulatePointerEvent('pointermove', header, 56, 35);
138138
fix.detectChanges();
139-
await wait(100);
139+
await wait();
140140

141141
UIInteractions.simulatePointerEvent('pointermove', header, 550, 20);
142142
fix.detectChanges();
143-
await wait(100);
143+
await wait();
144144

145145
UIInteractions.simulatePointerEvent('pointerup', header, 550, 20);
146146
fix.detectChanges();
147-
await wait(100);
147+
await wait();
148148

149+
const headerCells = fix.debugElement.queryAll(By.css('igx-grid-header')).map(h => h.nativeElement.innerText.trim());
150+
expect(headerCells[0]).toBe('Name');
149151
TreeGridFunctions.verifyTreeColumn(fix, 'Name', 4);
150152
});
151153

@@ -321,20 +323,22 @@ describe('IgxTreeGrid - Integration #tGrid', () => {
321323
const header = TreeGridFunctions.getHeaderCell(fix, 'ID').nativeElement;
322324
UIInteractions.simulatePointerEvent('pointerdown', header, 50, 35);
323325
fix.detectChanges();
324-
await wait(100);
326+
await wait();
325327

326328
UIInteractions.simulatePointerEvent('pointermove', header, 56, 35);
327329
fix.detectChanges();
328-
await wait(100);
330+
await wait();
329331

330332
UIInteractions.simulatePointerEvent('pointermove', header, 550, 20);
331333
fix.detectChanges();
332-
await wait(100);
334+
await wait();
333335

334336
UIInteractions.simulatePointerEvent('pointerup', header, 550, 20);
335337
fix.detectChanges();
336-
await wait(100);
338+
await wait();
337339

340+
const headerCells = fix.debugElement.queryAll(By.css('igx-grid-header')).map(h => h.nativeElement.innerText.trim());
341+
expect(headerCells[0]).toBe('ParentID');
338342
TreeGridFunctions.verifyTreeColumn(fix, 'ParentID', 5);
339343
});
340344

0 commit comments

Comments
 (0)