5: Add In-app Navigation
authorKai Moritz <kai@juplo.de>
Fri, 8 May 2020 23:34:12 +0000 (01:34 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 11 May 2020 16:23:16 +0000 (18:23 +0200)
d) Navigating to hero details - Fixed unit-test

src/app/app.component.spec.ts

index 38559f2..8f874ef 100644 (file)
@@ -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');
   });
 });