it.only gives "Cannot read properties of undefined (reading 'parent')" with Stack Overflow solution for soft assertion #23280
-
Stack Overflow: "Does cypress support soft assertion?" which was published over 3 years ago suggests a solution for soft assertion. At the time the contribution was published, I asked in July 2022 in the above Stack Overflow article if there is a solution to allow Can anybody advise what needs to be changed to get The Stack Overflow post: How can I make Steps to reproduceTo reproduce, take the code from Stack Overflow: "Does cypress support soft assertion?" and add it into describe('it.only test', () => {
it.only('test', () => {
cy.log("Printing a message to the Cypress Command Log.")
});
}); The console logs shows the following on Cypress 9.7.0:
or after migrating to Cypress 10.4.0, where the error message is identical to 9.7.0 and the stack trace is also the same, apart from line numbers:
ExpectationAttempting to run the test spec above should run the test without any error message when using the code from Stack Overflow: "Does cypress support soft assertion?". Under the old Cypress 3.8.3 version this is no problem: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
hi @MikeMcC399. I found a workaround:
Hope this helps you. |
Beta Was this translation helpful? Give feedback.
-
In addition there is a new issue:
|
Beta Was this translation helpful? Give feedback.
-
hi, I make an example here: https://github.com/lehoanglu0ng/cypress-only |
Beta Was this translation helpful? Give feedback.
hi,
I make an example here: https://github.com/lehoanglu0ng/cypress-only