Checking if multiple elements are rendering using jasmine

The solution for “Checking if multiple elements are rendering using jasmine” can be found here. The following code will assist you in solving the problem.

it(‘should check if all div are appearing which are dependent on a common condition’, () => {
component.someCommonCondition = true;
// now the prob lies in line below since it only gets the first element of the mentioned class
const contentChecks = fixture.debugElement.queryAll(By.css(‘.someClass’))

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

inline scripts encapsulated in