You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to this plugin, just wondering why not allow tests to set their own patterns and config? I frequently find myself going back to the config to adjust config just for certain tests, of which I don't want adjusting for globally.
ie:
constautoRecord=require('cypress-autorecord');// Require the autorecord functiondescribe('Test Articles Page',function(){// Do not use arrow functionsautorecord({interceptPattern: "**/api/v1/items/articles/**",// forceRecord: true,// cleanMocks: true,});// Your hooks (beforeEach, afterEach, etc) goes hereit('...',function(){// Do not use arrow functions// Your test goes here});});
This:
makes it clearer what's going on in that particular test
allows config to be specific to the test case only
allows one to forceRecord / clear mocks on demand for specific test
makes everything easier to maintain by separating actual plugin config from tests (I don't want to change configuration only to revert it back because I am working on a particular test I need to recapture data for)
and yes, I have not looked into the source to determine the possibility of this, however, I believe this is a more clearer and more efficient manner to do this.
The text was updated successfully, but these errors were encountered:
emahuni
changed the title
Why allow specific config on per test basis?
Why not allow specific config on per test basis?
Jul 11, 2023
I am new to this plugin, just wondering why not allow tests to set their own patterns and config? I frequently find myself going back to the config to adjust config just for certain tests, of which I don't want adjusting for globally.
ie:
This:
and yes, I have not looked into the source to determine the possibility of this, however, I believe this is a more clearer and more efficient manner to do this.
The text was updated successfully, but these errors were encountered: