Nanciee/cypress-autorecord

a flag to rewrite URLs

Opened this issue · 1 comments

The problem that I'm having:

  • I'm recording against an integrated environment, which results in its URLs getting into the .spec.json
  • on CI, however, I'm running the tests against a localhost env, so the requests are not matched, because the URLs are different

A simple solution might be to add a config option that would match a base url and substitute it with '**', but maybe someone could point me to another way of making it work?

I had this same problem. I've submitted a PR which is one approach for addressing it.

Edit: I ended up rolling this in as a feature of: https://github.com/Sam152/cypress-replay