worried-florist-70313
01/27/2023, 4:10 PMjavascript
productList.each($el =>
cy
.wrap($el)
.should(
'satisfy',
() =>
cy.wrap($el).find('#product-title').should('contain.text', 'house blend') ||
cy.wrap($el).find('#product-description').should('contain.text', 'house blend')
)
)
This seems to produce an infinite loop though. In the end, I just want this assertion to be true if either one of the strings contains the correct substring house blendadorable-smartphone-87280
01/27/2023, 4:19 PM.get().invoke("text") on each element and store them as variables, concatenate them together, and then verify if that resulting string contains the substring you want....worried-florist-70313
01/27/2023, 4:23 PMworried-florist-70313
01/27/2023, 4:24 PMfind() statementgray-kilobyte-89541
01/27/2023, 4:25 PM