cypress-har-generator icon indicating copy to clipboard operation
cypress-har-generator copied to clipboard

Lack of documentation for cypress 10.x version

Open szamacz opened this issue 2 years ago • 1 comments

Since Cypress version 10 lot of the things has been changed and current documentation for setup is outdated (https://docs.cypress.io/guides/references/migration-guide). Could you please update documentation to be align with newest Cypress version? Thanks

szamacz avatar Jul 15 '22 15:07 szamacz

We have used this plugin on Cypress 10 without issue, the only change is that the setup steps that used to go in your plugins.js file now go under the e2e.setupNodeEvents section of your cypress.config.js:

const { install, ensureBrowserFlags } = require('@neuralegion/cypress-har-generator');

module.exports = {
  e2e: {
    setupNodeEvents(on, config) {
      install(on, config);
      on('before:browser:launch', (browser = {}, launchOptions) => {
        ensureBrowserFlags(browser, launchOptions);
        return launchOptions;
      });
    }
  }
}

csvan avatar Jul 26 '22 08:07 csvan