Skip to content

Commit ced1460

Browse files
committed
chore(*): update failing tests
1 parent bf0144a commit ced1460

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2657,7 +2657,7 @@ describe('IgxGrid - Cell selection #grid', () => {
26572657
expect(grid.getSelectedData()).toEqual(selectedData);
26582658
const cell = grid.getCellByColumn(2, 'ID');
26592659

2660-
expect(grid.getRowByIndex(2).selected).toBeTruthy();
2660+
expect(grid.getRowByIndex(2).selected).toBeFalsy();
26612661
UIInteractions.triggerKeyDownEvtUponElem('space', cell.nativeElement, true, false, false);
26622662
fix.detectChanges();
26632663

projects/igniteui-angular/src/lib/input-group/input-group.directive.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe('IgxInputGroup', () => {
183183
fixture.detectChanges();
184184

185185
const inputGroup = fixture.componentInstance.igxInputGroup;
186-
UIInteractions.simulateClickEvent(inputGroup.element);
186+
UIInteractions.simulateClickEvent(inputGroup.element.nativeElement);
187187
await wait();
188188
fixture.detectChanges();
189189

projects/igniteui-angular/src/lib/test-utils/ui-interactions.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export class UIInteractions {
3131
public static simulateClickAndSelectEvent(element, shift = false, ctrl = false) {
3232
const nativeElement = element.nativeElement ? element.nativeElement : element;
3333
UIInteractions.simulatePointerOverElementEvent('pointerdown', nativeElement, shift, ctrl);
34+
nativeElement.dispatchEvent(new MouseEvent('focus', { bubbles: true }));
3435
UIInteractions.simulatePointerOverElementEvent('pointerup', nativeElement);
3536
nativeElement.dispatchEvent(new MouseEvent('click', { bubbles: true }));
3637
}
@@ -53,6 +54,7 @@ export class UIInteractions {
5354
public static simulateNonPrimaryClick(element) {
5455
const nativeElement = element.nativeElement ? element.nativeElement : element;
5556
nativeElement.dispatchEvent(new PointerEvent('pointerdown', { button: 2 }));
57+
nativeElement.dispatchEvent(new Event('focus'));
5658
nativeElement.dispatchEvent(new PointerEvent('pointerup', { button: 2 }));
5759
nativeElement.dispatchEvent(new Event('click'));
5860
}

0 commit comments

Comments
 (0)