How to check that element has either of classes in Cypress?
Cypress .should() wraps chai assertions, so from how to do an “or” in chai should the following html fragment <div id=”1″ class=”class1″></div> <div id=”2″ class=”class2″></div> <div id=”3″ class=”class1 class2″></div> <div id=”4″ class=”class3″></div> can be tested like this it(‘finds either class1 or class2’, () => { cy.get(‘div#1’) .should(‘satisfy’, ($el) => { const classList = Array.from($el[0].classList); return … Read more