Refine spec of repository.

This commit is contained in:
kunw 2017-05-17 13:33:31 +08:00
parent de88cccf77
commit 833c9f8f2e

View File

@ -96,13 +96,14 @@ describe('RepositoryComponent (inline template)', ()=> {
fixture.detectChanges();
comp.doSearchRepoNames('nginx');
fixture.detectChanges();
let de: DebugElement = fixture.debugElement.query(By.css('datagrid-cell'));
let de: DebugElement[] = fixture.debugElement.queryAll(By.css('datagrid-cell'));
fixture.detectChanges();
expect(de).toBeTruthy();
let el: HTMLElement = de.nativeElement;
expect(de.length).toEqual(1);
let el: HTMLElement = de[0].nativeElement;
fixture.detectChanges();
expect(el).toBeTruthy();
expect(el.textContent).toEqual('library/nginx');
expect(el.textContent).not.toEqual('library/busybox');
});
}));