0
Ich möchte eine Komponente testen, die Material-Design verwendet und einen Titel hat.Angular 2 Spec Test für eine Komponente mit Material-Design
<md-card-title>{{title}}</md-card-title>
Wie kann ich das Element mit dem Titel abfragen?
it('should display original title',() => {
// trigger change detection to update the view
fixture.detectChanges();
// query for the title by what ???
de = fixture.debugElement.query(By ???('md-card-title'));
// confirm the element's content
expect(de.nativeElement.textContent).toContain(comp.title);
});