so, "how do you update the fixture files?" , is th...
# best-practices
m
so, "how do you update the fixture files?" , is that right? I do not know of any. Thankfully, apis do not change as much. A better way I've found as opposed to fixture files are test utilities to generate domain entities. Something like, we have a service A, it generates x, y, z objects. We create test utils that create these objects, and use them in e2e , as well as unit tests. With cy intercept then the instead of the fixture, you just feed the body , body : yourGenerated object. Then if the API is updated, it's somebodies job to update the test utils. there were some network recording plugins back in the cy.route days you would run a test as e2e, it would record all network, and stub all network in subsequent runs they were good, if authentication wasn't needed in the real world, I did not succeed because of auth needs...
2 Views