Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Status and Added interceptPattern in config #50

Merged
merged 3 commits into from
May 27, 2021
Merged

Fix Status and Added interceptPattern in config #50

merged 3 commits into from
May 27, 2021

Conversation

Ika-x
Copy link
Contributor

@Ika-x Ika-x commented May 20, 2021

Problem

  • still sending request on actual destination server without mocking them
  • root cause of this problem was that autoRecorder wast saving the status since it was getting status from req.status. status is located in res.statusCode so we should get it from there

Additional improvement

  • added another config - interceptPattern to pass what backend request you want to listen and mock. in most case (at least for me) i dont want to record GA stripe or other plugins requests so its ok to send them and keep mock data small and simple. to have such ability added that config. in case its not exists or empty we will use old approach - * which is recording everything

@Nanciee
Copy link
Owner

Nanciee commented May 20, 2021

@Ika-x Thanks for the fix! Could you add in a section in the ReadMe for the interceptPattern config?

@Ika-x
Copy link
Contributor Author

Ika-x commented May 21, 2021

@Ika-x Thanks for the fix! Could you add in a section in the ReadMe for the interceptPattern config?

sure @Nanciee. just updated 👍

@Nanciee Nanciee merged commit 5eb653d into Nanciee:master May 27, 2021
mhssmnn added a commit to mhssmnn/cypress-autorecord that referenced this pull request Aug 22, 2021
Merge pull request Nanciee#50 from filestage/master

This cherry pick includes just the syntactical changes from the
filestage/master pull request
mhssmnn added a commit to mhssmnn/cypress-autorecord that referenced this pull request Aug 23, 2021
This reverts commit 5eb653d, reversing
changes made to 0537401.
mhssmnn added a commit to mhssmnn/cypress-autorecord that referenced this pull request Aug 23, 2021
Merge pull request Nanciee#50 from filestage/master

This cherry pick includes just the syntactical changes from the
filestage/master pull request
@mhssmnn mhssmnn mentioned this pull request Aug 23, 2021
@rantiev
Copy link

rantiev commented Sep 9, 2021

It tries to mock templates/css/js files as well, how to prevent it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants