Skip to content

Releases: NeuraLegion/cypress-har-generator

v5.0.0

27 Apr 13:22
Compare
Choose a tag to compare

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 accepts options object instead of fileName parameter. It allows us to configure outDir 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

18 Feb 01:18
e437e87
Compare
Choose a tag to compare

4.0.0 (2020-02-18)

Bug Fixes

  • plugin: replace old browser args with a new launch options (#32) (e437e87), closes #31

BREAKING CHANGES

  • plugin: The ensureRequiredBrowserFlags method is no longer supported. It was renamed the ensureBrowserFlags 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

23 Dec 20:09
79a51ad
Compare
Choose a tag to compare

3.0.0 (2019-12-23)

Features

  • plugin: generate a separate har file per test (#26) (79a51ad), closes #22

BREAKING CHANGES

  • plugin: support.js module has been removed.
    Now to register commands the end-user must import commands.js to a support file cypress/support/index.js. commands.js provides two commands: recordHar and saveHar.
    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

23 Dec 12:08
734878c
Compare
Choose a tag to compare

2.0.3 (2019-12-23)

Bug Fixes

  • network: fetch content data as long as exists target session (#25) (734878c), closes #24

v2.0.2

16 Dec 20:08
fe01470
Compare
Choose a tag to compare

2.0.2 (2019-12-16)

Bug Fixes

  • plugin: allow a user to set --headless via cypress (#21) (fe01470), closes #17

v2.0.1

16 Dec 07:57
Compare
Choose a tag to compare

2.0.1 (2019-12-16)

Bug Fixes

  • readme: add where default path to har will be saved (#19) (488ced4)

v2.0.0

12 Dec 20:33
fcac329
Compare
Choose a tag to compare

2.0.0 (2019-12-12)

Features

  • plugin: allow the users to configure browser args (#14) (fcac329), closes #13

BREAKING CHANGES

  • plugin: install function has been split in two parts: install and ensureRequiredBrowserFlags.

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)
  );
};

v1.0.2

11 Dec 09:26
14e9ffc
Compare
Choose a tag to compare

1.0.2 (2019-12-11)

Bug Fixes

  • support: put in the root to allow using require with slash notation (#11) (14e9ffc), closes #10

v1.0.1

11 Dec 08:58
265a205
Compare
Choose a tag to compare

1.0.1 (2019-12-11)

Bug Fixes

  • package.json: update list dependencies (#9) (265a205), closes #8

v1.0.0

02 Dec 20:07
8effd62
Compare
Choose a tag to compare

1.0.0 (2019-12-02)

Features

  • network: implement the har generator on base chrome devtools protocol (#4) (8effd62), closes #1