v3.0.0
3.0.0 (2019-12-23)
Features
BREAKING CHANGES
- plugin:
support.js
module has been removed.
Now to register commands the end-user must importcommands.js
to a support filecypress/support/index.js
.commands.js
provides two commands:recordHar
andsaveHar
.
The commands allow the end-user to manage the lifecycle of the plugin.
Please take note that the plugin does not provide the ability to record single HAR for all spec files like before.
Before:
// cypress/support/index.js
require('@neuralegion/cypress-har-generator/support');
After:
// cypress/support/index.js
require('@neuralegion/cypress-har-generator/commands');
// cypress/integration/users.spec.js
describe('my tests', () => {
before(() => {
// start recording
cy.recordHar();
});
after(() => {
// HAR will be saved as users.spec.har
// at the root of the project
cy.saveHar();
});
});