X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Fapp.component.spec.ts;h=f98a32f4f3afb6c664af8a6b79c318d2fde1a498;hb=refs%2Fheads%2Fdirekt;hp=ded94c9cef9b8080fbc392b5c77f583dc26f1861;hpb=fe13c256eb0be311a34d88c35f91b3d519b19f12;p=examples%2Fangular-tour-of-heroes diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index ded94c9..f98a32f 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -1,11 +1,16 @@ import { TestBed, async } from '@angular/core/testing'; import { AppComponent } from './app.component'; +import {Component} from '@angular/core'; + +@Component({selector: 'app-vorgang', template: ''}) +class VorgangStubComponent {} describe('AppComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ - AppComponent + AppComponent, + VorgangStubComponent ], }).compileComponents(); })); @@ -16,16 +21,16 @@ describe('AppComponent', () => { expect(app).toBeTruthy(); }); - it(`should have as title 'angular-tour-of-heroes'`, () => { + it(`should show expected title`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('angular-tour-of-heroes'); + expect(app.title).toEqual('LVM - Camunda-Beispiel'); }); it('should render title', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('.content span').textContent).toContain('angular-tour-of-heroes app is running!'); + expect(compiled.querySelector('h1').textContent).toContain('LVM - Camunda-Beispiel'); }); });