Cypress CT 6/8 - Forms & Intercepting Requests

Sdílet
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...

Komentáře • 4

  • @wobsoriano
    @wobsoriano Před 2 lety +1

    So this is where testing with VTU+Vitest vs Cypress gets different. The built-in intercept function is cool!

    • @LachlanMiller
      @LachlanMiller  Před 2 lety

      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.

    • @wobsoriano
      @wobsoriano Před 2 lety

      @@LachlanMiller wondering if we can use intercept without the api server running. Probably with msw?

    • @LachlanMiller
      @LachlanMiller  Před 2 lety

      @@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!