From 9386655c8b94d6bc23bc7d285e934f9fccae18ac Mon Sep 17 00:00:00 2001 From: Steve Brush Date: Fri, 28 Sep 2018 12:39:05 -0400 Subject: [PATCH] Fixed errors in logs during unit tests (#2037) --- package.json | 2 +- src/modules/confirm/confirm.service.spec.ts | 12 +++++++++++- .../confirmation-dialog.service.spec.ts | 14 ++++++++++++-- src/modules/error/error-modal.service.spec.ts | 12 +++++++++++- src/modules/tiles/tile/tile.component.ts | 2 +- 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3766398a4..6616b5ec3 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@angular/platform-browser-dynamic": "4.3.6", "@angular/router": "4.3.6", "@blackbaud/skyux": "latest", - "@blackbaud/skyux-builder": "1.23.1", + "@blackbaud/skyux-builder": "1.23.2", "@types/core-js": "0.9.41", "@types/jasmine": "2.5.47", "@types/node": "7.0.18", diff --git a/src/modules/confirm/confirm.service.spec.ts b/src/modules/confirm/confirm.service.spec.ts index 2250bd20d..7a8d81b12 100644 --- a/src/modules/confirm/confirm.service.spec.ts +++ b/src/modules/confirm/confirm.service.spec.ts @@ -13,7 +13,17 @@ describe('Confirm service', () => { let confirmService: SkyConfirmService; beforeEach(() => { - modalService = new MockSkyModalService(undefined, undefined, undefined); + modalService = new MockSkyModalService( + { + resolveComponentFactory() {} + } as any, + { + bootstrap() {} + } as any, + { + addHostEl: function (): any {} + } as any + ); confirmService = new SkyConfirmService(modalService); }); diff --git a/src/modules/confirmation-dialog/confirmation-dialog.service.spec.ts b/src/modules/confirmation-dialog/confirmation-dialog.service.spec.ts index 55501b7c4..cc85bfb61 100644 --- a/src/modules/confirmation-dialog/confirmation-dialog.service.spec.ts +++ b/src/modules/confirmation-dialog/confirmation-dialog.service.spec.ts @@ -6,7 +6,17 @@ import { SkyConfirmationDialogComponent } from './confirmation-dialog.component' describe('Confirmation dialog service', () => { it('should open confirmation dialog with correct parameters', () => { - let modalService = new MockModalService(undefined, undefined, undefined); + let modalService = new MockModalService( + { + resolveComponentFactory() {} + } as any, + { + bootstrap() {} + } as any, + { + addHostEl: function (): any {} + } as any + ); const config: SkyConfirmationDialogConfig = { message: 'dialog description', @@ -18,7 +28,7 @@ describe('Confirmation dialog service', () => { providers: [{ provide: SkyConfirmationDialogConfig, useValue: config }] }; - let service = new SkyConfirmationDialogService(modalService); + let service = new SkyConfirmationDialogService(modalService as any); service.open(config); expect(modalService.openCalls.length).toBe(1); diff --git a/src/modules/error/error-modal.service.spec.ts b/src/modules/error/error-modal.service.spec.ts index e170e1722..d149534f9 100644 --- a/src/modules/error/error-modal.service.spec.ts +++ b/src/modules/error/error-modal.service.spec.ts @@ -18,7 +18,17 @@ import { describe('Error modal service', () => { it('Test open is called with correct parameters', () => { - let modalService = new MockModalService(undefined, undefined, undefined); + let modalService = new MockModalService( + { + resolveComponentFactory() {} + } as any, + { + bootstrap() {} + } as any, + { + addHostEl: function (): any {} + } as any + ); const config: ErrorModalConfig = { errorTitle: 'Error title', diff --git a/src/modules/tiles/tile/tile.component.ts b/src/modules/tiles/tile/tile.component.ts index a010eb966..49844abe2 100644 --- a/src/modules/tiles/tile/tile.component.ts +++ b/src/modules/tiles/tile/tile.component.ts @@ -52,7 +52,7 @@ export class SkyTileComponent { this.isCollapsedChange.emit(value); } - @ViewChild('grabHandle') + @ViewChild('grabHandle', { read: ElementRef }) private grabHandle: ElementRef; @ViewChild('titleContainer')