`I have configured soft assert from npm (npm i soft-assert) and now my package.josn has "soft-assert": "^0.2.3"
i want to use function of Soft assert 'softAssert(actual, expected, msg, ignoreKeys)'
But don't know, what is the exact steps to use it
Example: When i use soft assertion function in my code, getting following error.
If i use like this
- cy.softAssert(10, 12, "expected actual mismatch and will execute next line") : not supported or if i use different way like
- softAssert(10, 12, "expected actual mismatch and will execute next line") : SoftAssert not defined
Can any one tell me how to use this 'softAssert' function in cypress code with some small example.`
Now the problem I am facing
it('asserts and logs and fails', () => {
Cypress.softAssert(10, 12, "expected actual mismatch...");
cy.log("text")
Cypress.softAssertAll();
})
I need my code after soft assertion as cy.log("text")
to be executed in the same 'it' block but the current test failing the whole 'it' block, without executing 'cy.log("text")' statement.