Angular2 async testing issue with ng-inline-svg

Viewed 821

I wrote test for my angular2 component which uses ng-inline-svg module to load my svg file. And after writing actual component it turned out that component works nicely, but test fails. I suspect that test does not wait for svg insertion to finish. Is there some way to fix it? Test which fails:

it('Should create new svg element', async(()=>{
    fixture.detectChanges();
    expect(de.query(By.css('svg'))).toBeTruthy();
}));

If i replace 'svg' selector with say 'div' it finds wrapper without issue.

1 Answers
Related