Cypress CT 6/8 - Forms & Intercepting Requests
Vložit
- čas přidán 7. 09. 2024
- 💻 Code: github.com/lmi...
🐦 Twitter: / lachlan19900
🎥 Course: "Composition API" lachlanmiller....
👉 $10 off with CYPRESS_CT_YT)
📖 Book: "Design Patterns for Vue.js" lachlan-miller...
👉 $5 off with the code "YT_5_OFF"
🚀 Cypress CT Docs: docs.cypress.i...
So this is where testing with VTU+Vitest vs Cypress gets different. The built-in intercept function is cool!
Yep - doing this is horrible with any other frameworks (Jest, etc - you can mock axios or use mock server worker, but those are both far worse).
I am happy with Cypress for now - it's far from perfect but does the E2E + CT combo better than any other single tool. Having a single tool for all the things is really useful.
@@LachlanMiller wondering if we can use intercept without the api server running. Probably with msw?
@@wobsoriano You can intercept a request w/o an API server - it hits the Cypress network layer and if intercepted, will never make it to your back-end.
So, you could build out an entire app w/o a backend!