Hi,
I know the difference between end-to-end and unit testing and it's bad practice to do tests later, no need to give me a lecture on that
I will tell you my story first: I have an web app, build with Flask and Svelte, where Flask is acting like an API, and JS is doing all the requests - long story short, no SSR or such. I'm not thinking of how much of my application should I test with unit tests and end-to-end tests.
Right now I'm thinking that API endpoints should definitely be tested as units, some UI parts (form validation, displaying the data my app has got from Flask) as unit tests, and the latter, aka all the other interacting with all db, frontend, backend (choosing a date from a calendar, searching by name, sending form) would all be end-to-end tests.
I'm asking if this would be suitable testing for my app? Or should I dump UI tests and do these as end-to-end as well?