Skip to content

v3.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 23 Dec 20:09
· 239 commits to master since this release
79a51ad

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