diff --git a/src/app/contact/contact.component.spec.ts b/src/app/contact/contact.component.spec.ts index 427633e..c0d59ab 100644 --- a/src/app/contact/contact.component.spec.ts +++ b/src/app/contact/contact.component.spec.ts @@ -1,14 +1,23 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import {RouterTestingModule} from '@angular/router/testing'; import { ContactComponent } from './contact.component'; +import { Angulartics2 } from 'angulartics2'; describe('ContactComponent', () => { let component: ContactComponent; let fixture: ComponentFixture; beforeEach(async(() => { + const analytics = jasmine.createSpyObj('piwik', ['startTracking']); TestBed.configureTestingModule({ - declarations: [ ContactComponent ] + imports: [ + RouterTestingModule, + ], + declarations: [ ContactComponent ], + providers: [ + { provide: Angulartics2, useValue: analytics }, + ], }) .compileComponents(); })); diff --git a/src/app/toolbar/toolbar.component.spec.ts b/src/app/toolbar/toolbar.component.spec.ts index ebbf1a1..0483b9b 100644 --- a/src/app/toolbar/toolbar.component.spec.ts +++ b/src/app/toolbar/toolbar.component.spec.ts @@ -36,12 +36,12 @@ describe('ToolbarComponent', () => { }); it('should contain a material toolbar', () => { - expect(fixture.debugElement.children[0].nativeElement.className).toBe('mat-drawer-container mat-sidenav-container'); + expect(fixture.debugElement.children[0].nativeElement.className).toBe('mat-toolbar mat-toolbar-multiple-rows'); }); it('should contain 4 links, Home, Resume, Projects, Contact', () => { const debugElements = fixture.debugElement.queryAll((element) => { - return element.nativeElement.className.indexOf('mat-toolbar') !== -1; + return element.nativeElement.className.indexOf('mat-toolbar-row') !== -1; }); expect(debugElements[0].children.length).toBe(4);