cypress-autorecord icon indicating copy to clipboard operation
cypress-autorecord copied to clipboard

a flag to rewrite URLs

Open kkhaidukov opened this issue 3 years ago • 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?

kkhaidukov avatar Jan 17 '22 11:01 kkhaidukov

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

Sam152 avatar May 12 '22 04:05 Sam152