d) Navigating to hero details - Fixed unit-test
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');
});
});