Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing cucumber report when using cypress-image-diff and cypress-cucumber-preprocessor #222

Closed
KaiWissel opened this issue Jul 1, 2024 · 2 comments

Comments

@KaiWissel
Copy link

Hi folks,

after including the image diff plugin to our project which has already the cucumber preprocessor plugin configured, I encountered the problem that my cucumber reports (HTML and JSON) will not be generated anymore.

I couldn't find any hints in the documentation of image diff or the cucumber plugin. Has anyone faced the same problem and can point me in the correct direction? I guess the image diff plugin overwrites some hook for the cucumber report.

I'm using the following versions for Cypress and different plugins (in fact everything up-to-date):
"cypress": "13.12.0",
"@badeball/cypress-cucumber-preprocessor": "20.1.0",
"cypress-image-diff-html-report": "2.1.2",
"cypress-image-diff-js": "2.2.1",

My cypress setupNodeEvents looks like this:

export const setupNodeEvents = async (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => {

  await addCucumberPreprocessorPlugin(on, config);

  on(
    'file:preprocessor',
    browserify(config, {
      typescript: require.resolve('typescript'),
    }),
  );

  on('task', {
    // ...
  });

  on('task', {
      // ...
  });

  on('after:run', async () => {
    await afterRunHandler(config);
    // ...
  });

  return getCompareSnapshotsPlugin(on, config);
}
@kien-ht
Copy link
Collaborator

kien-ht commented Jul 1, 2024

It looks like it's a duplicate issue. Please take a look at #183 and #177

@kien-ht kien-ht closed this as completed Jul 1, 2024
@KaiWissel
Copy link
Author

@kien-ht thanks a lot.
The proposed solution in #183 worked 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants