Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
Fixed errors in logs during unit tests (#2037)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackbaud-SteveBrush authored Sep 28, 2018
1 parent 9cfef9f commit 9386655
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 11 additions & 1 deletion src/modules/confirm/confirm.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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);
Expand Down
12 changes: 11 additions & 1 deletion src/modules/error/error-modal.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/modules/tiles/tile/tile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class SkyTileComponent {
this.isCollapsedChange.emit(value);
}

@ViewChild('grabHandle')
@ViewChild('grabHandle', { read: ElementRef })
private grabHandle: ElementRef;

@ViewChild('titleContainer')
Expand Down

0 comments on commit 9386655

Please sign in to comment.