4 ms·
I feel like our industry kinda went the wrong way wrt UI frontend tests. It should be much less focused on unit testing and more about flow and state represent
by ffsm8 2y ago
I feel like our industry kinda went the wrong way wrt UI frontend tests.
It should be much less focused on unit testing and more about flow and state representation, both of which can only be tested visually. And if a flow or state representation changed, that should equate to a simple warning which automatically approves the new representation as the default.
So a good testing framework would make it trivial to mock the API responses to create such a flow, and then automatically do a visual regression of the process.
Cypress component tests do some of this, but it's still a lackluster developer experience, honestly
This is specifically about UI frontend tests. Code that doesn't end up in the DOM are great for unit tests.