At the end of my test, I'm verifying multiple values to see if they're correctly captured in the form. I'm using expect statements. I realized if one expect fails, rest will not execute. All these verification are part of a single test case. I do want my test case to be marked as fail even if one expect fails but would like all the expect statements to be executed. So I can't really separate them. Is there an alternative? Do soft assertions work for Cypress?
verifyRoledetails(testobject) {
cy.contains('h3','Role details').nextUntil('button').should(($roledetails)=> {
expect($roledetails.children('label').get(0).innerText).to.eq('Role title');
expect($roledetails.children('p').get(0).innerText).to.eq(testobject.role_details.title);
expect($roledetails.children('label').get(1).innerText).to.eq('Where is the role based');
expect($roledetails.children('p').get(1).innerText).to.eq(testobject.role_details.role_basedat);
})
};