Is something like following possible?
const span= fixture.debugElement.query(By.css('span:containts("some text")'));
or is there something like a .cssContainingText
like with protractor? As a css selector or some other way.
Is something like following possible?
const span= fixture.debugElement.query(By.css('span:containts("some text")'));
or is there something like a .cssContainingText
like with protractor? As a css selector or some other way.
How about this approach:
const spans = fixture.debugElement.queryAll(By.css('span'));
const span = spans.find(span => span.nativeElement.textContent.includes('some text'))