Cypress doesn't provide out-of-the-box ability to make assertions on our frontend stores, so let's expose the store to the tests, and assert on it. We'll use our knowledge of Cypress's asynchronous programming style to access properties and functions on the store using cy.its and cy.invoke.
Hi Brett! Thank you for the course! I'm loving it so far!
I have a question: would you consider checking Redux state in this manner a good practice for real projects? You mentioned in a previous lecture (and I've read elsewhere) that testing implementation details can create brittle tests and it seems like this might fall into that category?
I totally understand that this lecture is probably aimed at showing off the capabilities of Cypress rather than suggesting this as a good practice. I'm just curious to hear your thoughts!