diff --git a/projects/igniteui-angular/src/lib/grids/grid/grid.search.spec.ts b/projects/igniteui-angular/src/lib/grids/grid/grid.search.spec.ts index f3bada047db..7563af922db 100644 --- a/projects/igniteui-angular/src/lib/grids/grid/grid.search.spec.ts +++ b/projects/igniteui-angular/src/lib/grids/grid/grid.search.spec.ts @@ -714,8 +714,8 @@ describe('IgxGrid - search API', () => { expect(isInView(3, grid.rowList.first.virtDirRow.state)).toBeTruthy(); }); - it('should keep the active highlight when active cell enters and exits edit mode', () => { - pending('When the cell enters edit mode, the highlight stays and the content is doubled! Happens in tests only!'); + fit('should keep the active highlight when active cell enters and exits edit mode', async () => { + // pending('When the cell enters edit mode, the highlight stays and the content is doubled! Happens in tests only!'); const rv = fix.debugElement.query(By.css(CELL_CSS_CLASS)).nativeElement; const cell = grid.getCellByColumn(0, 'ID'); const initialValue = rv.textContent; @@ -724,6 +724,7 @@ describe('IgxGrid - search API', () => { cell.column.editable = true; fix.detectChanges(); + await wait(16); grid.findNext('1'); @@ -731,6 +732,8 @@ describe('IgxGrid - search API', () => { expect(activeHighlight).not.toBeNull(); cell.inEditMode = true; + // fix.detectChanges(); + await wait(16); fix.detectChanges(); expect(cell.inEditMode).toBe(true); @@ -738,16 +741,17 @@ describe('IgxGrid - search API', () => { expect(activeHighlight).toBeNull(); cell.inEditMode = false; + await wait(16); fix.detectChanges(); - expect(rv.textContent).toBe(initialValue); + expect(rv.innerText).toBe(initialValue); expect(rv.querySelectorAll('.' + component.highlightClass).length).toBe(1); activeHighlight = rv.querySelector('.' + component.activeClass); expect(activeHighlight).not.toBeNull(); }); - it('should update highlights when a new value is entered', () => { - pending('When the cell enters edit mode, the highlight stays and the content is doubled! Happens in tests only!'); + fit('should update highlights when a new value is entered', async () => { + // pending('When the cell enters edit mode, the highlight stays and the content is doubled! Happens in tests only!'); const rv = fix.debugElement.query(By.css(CELL_CSS_CLASS)); const cell = grid.getCellByColumn(0, 'ID'); @@ -774,8 +778,9 @@ describe('IgxGrid - search API', () => { cell.update(inputElem.value); fix.detectChanges(); + await wait(16); - expect(rv.nativeElement.textContent).toBe('11'); + expect(rv.nativeElement.innerText).toBe('11'); activeHighlight = rv.nativeElement.querySelector('.' + component.activeClass); const highlights = rv.nativeElement.querySelectorAll('.' + component.highlightClass); expect(highlights.length).toBe(2);