I have this html:
<a routerLink="/about" routerLinkActive="active">some text</a>
And I have this test:
it(`should find a.active element`, async(() =>
{
fixture.detectChanges();
debug = fixture.debugElement.query(By.css('a.active'));
expect(debug).toBeTruthy();
}));
Why debug
here is null
? Why Angular can't find a.active
element even after fixture.detectChanges();
?
Aucun commentaire:
Enregistrer un commentaire