NeuraLegion / cypress-har-generator

Cypress plugin for generating HTTP Archive (HAR) files captures network requests during Cypress tests.
https://www.npmjs.com/package/@neuralegion/cypress-har-generator
MIT License
80 stars 18 forks source link

Using the package with Badeball Preprocessor #439

Open ebbimola opened 1 month ago

ebbimola commented 1 month ago

Description The package does not seem to be compatible with @badeball/cypress-cucumber-preprocessor

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

on('before:browser:launch', (browser = {}, launchOptions) => { ensureBrowserFlags(browser, launchOptions); return launchOptions; });

Please call the 'ensureBrowserFlags' before attempting to start the recording. cy.task('saveHar') failed with the following error: The task 'saveHar' was not handled in the setupNodeEvents method. The following tasks are registered: browserstack_log, cypress-cucumber-preprocessor:spec-envelopes, cypress-cucumber-preprocessor:test-case-started, cypress-cucumber-preprocessor:test-step-started, cypress-cucumber-preprocessor:test-step-finished, cypress-cucumber-preprocessor:test-case-finished, cypress-cucumber-preprocessor:create-string-attachment Fix this in your setupNodeEvents method here: /cypress.config.js Because this error occurred during a after all hook we are skipping all of the remaining tests. Although you have test retries enabled, we do not retry tests when before all or after all hooks