You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error
taskcp-visual-regression-diff-getScreenshotPathInfo, Object{4}, {log: false}
AFTER ALL (FAILED)
1
taskcp-visual-regression-diff-cleanupImages, {log: false}
CypressError
cy.task('cp-visual-regression-diff-cleanupImages') failed with the following error:
The 'task' event has not been registered in the setupNodeEvents method. You must register it before using cy.task()
I don't know if this could be related, but i get the same error message in my cypress app, where i don't initialize the node event. I'm working in a big repo, where we have multiple e2e apps which some of them uses visual regression testing and some of them don't. The apps that doesn't need to use this feature doesn't have it initialized in setupNodeEvents. When the test finishes, it fails inside afterAll hook on exactly the same message. Is there any settings i need to use to skip this task if i don't want to use that?
Sorry for long delay in the response.
Please help me understand the issue. From what I know about the plugin inner workings. When you do the second step from the installation guide, this plugin sets up a global after hook in which it tries to automatically cleanup unused image files.
But, for this feature to work a cleanup task needs to be registered and the task registration happens only when you use initPlugin function within setupNodeEvents in your cypress.config file.
So, to sum up - if you do only first two steps of installation guide, you'll receive this error. And I guess that shouldn't be considered a bug?
But I might be wrong, so please give me more info about your scenarios for me to understand where the plugin/documentation fails.
Describe the Bug
while running cypress component with plugin cypress-plugin-visual-regression-diff, getting below error
command executed: npx nx run-many -t component-test -p bindings-ng-pos --parallel=false --skip-nx-cache --watch
Error
taskcp-visual-regression-diff-getScreenshotPathInfo, Object{4}, {log: false}
AFTER ALL (FAILED)
1
taskcp-visual-regression-diff-cleanupImages, {log: false}
CypressError
cy.task('cp-visual-regression-diff-cleanupImages') failed with the following error:
The 'task' event has not been registered in the setupNodeEvents method. You must register it before using cy.task()
Fix this in your setupNodeEvents method here:
Steps to reproduce
Followed steps mentioned in the below page
https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff
Expected behavior
Visual comparison should work fine without any issue
no reference in document to resolve this issue
Additional context
No response
Package version
3.3.10
Device
Chrome Browser - Mac
OS and version
Mac OS Sonama 14.1.2 (23B92)
Browser and version
Chrome 120.0.6099.109
Node version
20.8.0
I can work on it by myself
Code of Conduct
The text was updated successfully, but these errors were encountered: