Skip to content

Commit 4c4a293

Browse files
committed
Merge remote-tracking branch 'origin/master' into dkamburov/pinning-config
2 parents 6186dd1 + 4ee3beb commit 4c4a293

16 files changed

+1437
-1890
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ describe('IgxCalendar - ', () => {
424424
const parent = dom.query(
425425
By.css(`${HelperTestFunctions.CALENDAR_ROW_CSSCLASS}:last-child`)
426426
);
427-
const target = parent.childNodes.pop();
427+
const parentDates = parent.queryAll(By.css(HelperTestFunctions.INACTIVE_DAYS_CSSCLASS));
428+
const target = parentDates[parentDates.length - 1];
428429

429430
target.nativeElement.click();
430431
fixture.detectChanges();

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

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ describe('Carousel', () => {
705705
carousel = fixture.componentInstance.carousel;
706706
});
707707

708-
it('should stop/play on tap ', async () => {
708+
it('should stop/play on tap ', () => {
709709
carousel.interval = 1000;
710710
carousel.play();
711711
fixture.detectChanges();
@@ -715,15 +715,13 @@ describe('Carousel', () => {
715715

716716
expect(carousel.isPlaying).toBeTruthy();
717717

718-
HelperTestFunctions.simulateTap(carousel);
718+
HelperTestFunctions.simulateTap(fixture, carousel);
719719
fixture.detectChanges();
720-
await wait(200);
721720

722721
expect(carousel.isPlaying).toBeFalsy();
723722

724-
HelperTestFunctions.simulateTap(carousel);
723+
HelperTestFunctions.simulateTap(fixture, carousel);
725724
fixture.detectChanges();
726-
await wait(200);
727725

728726
expect(carousel.isPlaying).toBeTruthy();
729727

@@ -733,15 +731,13 @@ describe('Carousel', () => {
733731

734732
expect(carousel.isPlaying).toBeFalsy();
735733

736-
HelperTestFunctions.simulateTap(carousel);
734+
HelperTestFunctions.simulateTap(fixture, carousel);
737735
fixture.detectChanges();
738-
await wait(200);
739736

740737
expect(carousel.isPlaying).toBeFalsy();
741738

742-
HelperTestFunctions.simulateTap(carousel);
739+
HelperTestFunctions.simulateTap(fixture, carousel);
743740
fixture.detectChanges();
744-
await wait(200);
745741

746742
expect(carousel.isPlaying).toBeFalsy();
747743
});
@@ -881,9 +877,11 @@ class HelperTestFunctions {
881877
expect(carousel.slides.find((slide) => slide.active && slide.index !== index)).toBeUndefined();
882878
}
883879

884-
public static simulateTap(carousel) {
880+
public static simulateTap(fixture, carousel) {
885881
const activeSlide = carousel.get(carousel.current).nativeElement;
886-
Simulator.gestures.press(activeSlide, { duration: 180 });
882+
const carouselElement = fixture.debugElement.query(By.css('igx-carousel'));
883+
carouselElement.triggerEventHandler('tap', {target: activeSlide});
884+
// Simulator.gestures.press(activeSlide, { duration: 180 });
887885
}
888886

889887
public static simulatePan(fixture, carousel, deltaXOffset, velocity) {

0 commit comments

Comments
 (0)