From: Kai Moritz Date: Fri, 8 May 2020 23:34:12 +0000 (+0200) Subject: 5: Add In-app Navigation X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=0e69f63239442f2533e2c84f1de9179e726eaf04;p=examples%2Fangular-tour-of-heroes 5: Add In-app Navigation d) Navigating to hero details - Fixed unit-test --- diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 38559f2..8f874ef 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -42,6 +42,7 @@ describe('AppComponent', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('nav > a').textContent).toContain('Heroes'); + expect(compiled.querySelector('nav > a:nth-child(1)').textContent).toContain('Dashboard'); + expect(compiled.querySelector('nav > a:nth-child(2)').textContent).toContain('Heroes'); }); });