Releases: NeuraLegion/cypress-har-generator
Releases · NeuraLegion/cypress-har-generator
v5.1.0
v5.0.1
v5.0.0
5.0.0 (2020-04-27)
Features
- plugin: add the ability to skip content loading (d3d5c92)
- network: use _webSocketMessages field for websocket frames (a038b6e)
BREAKING CHANGES
- network: HAR file includes WebSocket messages since Chrome 76. We use
_webSocketMessages
field like Chrome to keep backward compatibility with other tools._websocket
field is no longer supported and removed from HAR. - plugin: The
saveHar
method acceptsoptions
object instead offileName
parameter. It allows us to configureoutDir
as the output directory to write HAR files.
Before:
// cypress/integration/users.spec.js
// HAR will be saved as users.spec.har
// at the root of the project
cy.saveHar()
// HAR will be saved as example.com.har
cy.saveHar('example.com.har')
After:
// cypress/integration/users.spec.js
// HAR will be saved as users.spec.har
// at the root of the project
cy.saveHar()
// HAR will be saved as example.com.har
cy.saveHar({ fileName: 'example.com.har' })
// HAR will be saved as example.com.har
// at the ./hars folder
cy.saveHar({
fileName: 'example.com.har',
outDir: './hars'
})
The recordHar
method now accepts options
object too. content
field provides the ability to specify need loading content
fields.
Before:
// cypress/integration/users.spec.js
// Starts recording
cy.recordHar()
After:
// cypress/integration/users.spec.js
// Starts usual recording HAR
cy.recordHar() // or cy.recordHar({ content: true })
// Configures the plugin to skip loading `content` fields and starts recording HAR
cy.recordHar({ content: false })
v4.0.0
4.0.0 (2020-02-18)
Bug Fixes
BREAKING CHANGES
- plugin: The
ensureRequiredBrowserFlags
method is no longer supported. It was renamed theensureBrowserFlags
and now it accepts the second argument as an options object with an args property instead of an array of browser arguments.
Before:
// cypress/plugins/index.js
const { install, ensureRequiredBrowserFlags } = require('@neuralegion/cypress-har-generator');
module.exports = (on, config) => {
install(on, config);
on('before:browser:launch', (browser = {}, args) =>
ensureRequiredBrowserFlags(browser, args)
);
};
After:
// cypress/plugins/index.js
const { install, ensureBrowserFlags } = require('@neuralegion/cypress-har-generator');
module.exports = (on, config) => {
install(on, config);
on('before:browser:launch', (browser = {}, launchOptions) => {
ensureBrowserFlags(browser, launchOptions);
return launchOptions;
});
};
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();
});
});
v2.0.3
v2.0.2
v2.0.1
v2.0.0
2.0.0 (2019-12-12)
Features
BREAKING CHANGES
- plugin:
install
function has been split in two parts:install
andensureRequiredBrowserFlags
.
Before:
const { install } = require('@neuralegion/cypress-har-generator');
module.exports = (on, config) => {
install(on, config);
};
After:
const { install, ensureRequiredBrowserFlags } = require('@neuralegion/cypress-har-generator');
module.exports = (on, config) => {
install(on, config);
on('before:browser:launch', (browser = {}, args) =>
ensureRequiredBrowserFlags(browser, args)
);
};