Skip to content

Commit 9fc1a46

Browse files
authored
Merge branch '8.1.x' into ddimitrov/fix-5765-8.1.x
2 parents 05fc899 + cab508f commit 9fc1a46

File tree

6 files changed

+30
-33
lines changed

6 files changed

+30
-33
lines changed

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-theme.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@
867867

868868
&%igx-grid__tr--ghost {
869869
background: --var($theme, 'row-ghost-background');
870+
z-index: 1;
870871
}
871872
}
872873

projects/igniteui-angular/src/lib/dialog/dialog.component.spec.ts

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,14 @@ describe('Dialog', () => {
301301
expect(overlayWrapper.classList.contains(OVERLAY_WRAPPER_CLASS)).toBe(false);
302302
}));
303303

304-
it('Default button of the dialog is focused after opening the dialog and can be closed with keyboard.', (async() => {
304+
it('Default button of the dialog is focused after opening the dialog and can be closed with keyboard.', fakeAsync( () => {
305305
const fix = TestBed.createComponent(DialogComponent);
306306
fix.detectChanges();
307307

308308
const dialog: IgxDialogComponent = fix.componentInstance.dialog as IgxDialogComponent;
309309
dialog.open();
310+
tick(100);
310311
fix.detectChanges();
311-
await wait(16);
312312

313313
// Verify dialog is opened and its default right button is focused
314314
const dialogDOM = fix.debugElement.query(By.css('.igx-dialog'));
@@ -318,8 +318,8 @@ describe('Dialog', () => {
318318

319319
// Press 'escape' key
320320
UIInteractions.simulateKeyDownEvent(document.activeElement, 'Escape');
321+
tick(100);
321322
fix.detectChanges();
322-
await wait(16);
323323

324324
// Verify dialog is closed and its default right button is no longer focused
325325
expect(document.activeElement).not.toBe(rightButton.nativeElement);
@@ -329,20 +329,18 @@ describe('Dialog', () => {
329329
describe('Position settings', () => {
330330
let fix;
331331
let dialog;
332-
let detect;
333332

334333
beforeEach( fakeAsync(() => {
335334
fix = TestBed.createComponent(PositionSettingsDialogComponent);
336335
fix.detectChanges();
337336
dialog = fix.componentInstance.dialog;
338-
detect = () => dialog.cdr.detectChanges();
339337
}));
340338

341-
it('Define different position settings ', (async() => {
339+
it('Define different position settings ', fakeAsync(() => {
342340
const currentElement = fix.componentInstance;
343341
dialog.open();
342+
tick(16);
344343
fix.detectChanges();
345-
await wait(16);
346344

347345
expect(dialog.isOpen).toEqual(true);
348346
const firstContentRect = document.getElementsByClassName(CLASS_OVERLAY_CONTENT_MODAL)[0].getBoundingClientRect();
@@ -352,17 +350,17 @@ describe('Dialog', () => {
352350
expect(firstContentRect.top).toBeLessThanOrEqual(middleDialogPosition + 2, 'OffsetTop position check');
353351

354352
dialog.close();
353+
tick(16);
355354
fix.detectChanges();
356-
await wait(16);
357355

358356
expect(dialog.isOpen).toEqual(false);
359357
dialog.positionSettings = currentElement.newPositionSettings;
358+
tick(16);
360359
fix.detectChanges();
361-
await wait(16);
362360

363361
dialog.open();
362+
tick(16);
364363
fix.detectChanges();
365-
await wait(16);
366364

367365
expect(dialog.isOpen).toEqual(true);
368366
const secondContentRect = document.getElementsByClassName(CLASS_OVERLAY_CONTENT_MODAL)[0].getBoundingClientRect();
@@ -372,13 +370,13 @@ describe('Dialog', () => {
372370
expect(secondContentRect.left).toBeLessThanOrEqual(topDialogPosition + 2, 'OffsetLeft position check');
373371

374372
dialog.close();
373+
tick(16);
375374
fix.detectChanges();
376-
await wait(16);
377375

378376
expect(dialog.isOpen).toEqual(false);
379377
}));
380378

381-
it('Set animation settings', (async() => {
379+
it('Set animation settings', () => {
382380
const currentElement = fix.componentInstance;
383381

384382
// Check initial animation settings
@@ -390,12 +388,11 @@ describe('Dialog', () => {
390388

391389
dialog.positionSettings = currentElement.animationSettings;
392390
fix.detectChanges();
393-
await wait(16);
394391

395392
// Check the new animation settings
396393
expect(dialog.positionSettings.openAnimation.options.params.duration).toEqual('800ms', 'Animation duration is set to 800ms');
397394
expect(dialog.positionSettings.closeAnimation.options.params.duration).toEqual('700ms', 'Animation duration is set to 700ms');
398-
}));
395+
});
399396
});
400397

401398
function dispatchEvent(element: HTMLElement, eventType: string) {

projects/igniteui-angular/src/lib/directives/toggle/toggle.directive.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ describe('IgxToggle', () => {
118118
toggle.open();
119119
tick();
120120
expect(toggle.onOpened.emit).toHaveBeenCalledTimes(2);
121-
const otherId = overlay.show(fixture.componentInstance.other);
121+
122+
const otherId = overlay.attach(fixture.componentInstance.other);
123+
overlay.show(otherId);
122124
overlay.hide(otherId);
123125
tick();
124126
expect(toggle.onClosed.emit).toHaveBeenCalledTimes(1);

projects/igniteui-angular/src/lib/grids/grid/grid-filtering-ui.spec.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3313,38 +3313,35 @@ describe('IgxGrid - Filtering Row UI actions', () => {
33133313
it('should scroll correct chip in view when one is deleted', async() => {
33143314
grid.width = '700px';
33153315
fix.detectChanges();
3316+
await wait(30);
33163317

33173318
GridFunctions.clickFilterCellChip(fix, 'ProductName');
33183319
fix.detectChanges();
33193320

33203321
GridFunctions.applyFilter('a', fix);
3321-
await wait(16);
3322+
await wait(100);
33223323
GridFunctions.applyFilter('e', fix);
3323-
await wait(16);
3324+
await wait(100);
33243325
GridFunctions.applyFilter('i', fix);
3325-
await wait(16);
3326-
GridFunctions.applyFilter('o', fix);
3327-
// wait for chip to be scrolled in view
3328-
await wait(200);
3329-
fix.detectChanges();
33303326
await wait(100);
3327+
GridFunctions.applyFilter('o', fix);
3328+
await wait(300);
33313329
verifyMultipleChipsVisibility(fix, [false, false, false, true]);
33323330

33333331
const filterUIRow = fix.debugElement.query(By.css(FILTER_UI_ROW));
33343332
GridFunctions.removeFilterChipByIndex(3, filterUIRow);
33353333
// wait for chip to be scrolled in view
33363334
fix.detectChanges();
3337-
await wait(200);
3335+
await wait(400);
33383336

33393337
verifyMultipleChipsVisibility(fix, [false, true, false]);
33403338
let chips = filterUIRow.queryAll(By.directive(IgxChipComponent));
33413339
expect(chips.length).toBe(3);
33423340

33433341
GridFunctions.removeFilterChipByIndex(2, filterUIRow);
3342+
// wait for chip to be scrolled in view
33443343
fix.detectChanges();
3345-
// wait for chip to be scrolled in view
3346-
fix.detectChanges();
3347-
await wait(200);
3344+
await wait(300);
33483345

33493346
verifyMultipleChipsVisibility(fix, [true, false]);
33503347
chips = filterUIRow.queryAll(By.directive(IgxChipComponent));

projects/igniteui-angular/src/lib/grids/tree-grid/tree-cell.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</igx-date-picker>
2626
</ng-container>
2727
</ng-template>
28-
<ng-container *ngIf="!inEditMode">
28+
<ng-container *ngIf="!editMode">
2929
<ng-container *ngIf="level > 0">
3030
<div #indentationDiv class="igx-grid__tree-cell--padding-level-{{level}}"></div>
3131
</ng-container>

projects/igniteui-angular/src/lib/time-picker/time-picker.component.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ describe('IgxTimePicker', () => {
147147

148148
const target = dom.query(By.directive(IgxInputDirective));
149149

150-
spyOn(timePicker.onOpen, 'emit');
150+
spyOn(timePicker.onOpened, 'emit');
151151

152152
target.nativeElement.dispatchEvent(new Event('click', { bubbles: true }));
153153
tick();
154154

155-
expect(timePicker.onOpen.emit).toHaveBeenCalled();
155+
expect(timePicker.onOpened.emit).toHaveBeenCalled();
156156
}));
157157

158158
it('TimePicker Validation Failed event', fakeAsync(() => {
@@ -1403,21 +1403,21 @@ describe('IgxTimePicker', () => {
14031403

14041404
const iconTime = dom.queryAll(By.css('.igx-icon'))[0];
14051405

1406-
spyOn(timePicker.onOpen, 'emit');
1406+
spyOn(timePicker.onOpened, 'emit');
14071407

14081408
UIInteractions.clickElement(iconTime);
14091409
tick();
14101410
fixture.detectChanges();
14111411

1412-
expect(timePicker.onOpen.emit).toHaveBeenCalled();
1412+
expect(timePicker.onOpened.emit).toHaveBeenCalled();
14131413

1414-
spyOn(timePicker.onClose, 'emit');
1414+
spyOn(timePicker.onClosed, 'emit');
14151415

14161416
UIInteractions.clickElement(iconTime);
14171417
tick();
14181418
fixture.detectChanges();
14191419

1420-
expect(timePicker.onOpen.emit).toHaveBeenCalled();
1420+
expect(timePicker.onOpened.emit).toHaveBeenCalled();
14211421
}));
14221422

14231423
it('should display OK and Cancel buttons by default.', fakeAsync(() => {

0 commit comments

Comments
 (0)