cypress-io / cypress-documentation

Cypress Documentation for the Cypress App, API, Cypress Cloud, UI Coverage and Cypress Accessibility.
https://docs.cypress.io
MIT License
945 stars 1.05k forks source link

Remove mentions to outdated plugin: cypress-plugin-snapshots #5086

Closed dwilches closed 6 months ago

dwilches commented 1 year ago

In this and this pages there are mentions and instructions to install a plugin that has not worked with Cypress since version 4.5.0: cypress-plugin-snapshots.

The first page I mentioned even has instructions to install this plugin:

  // run 'npm i cypress-plugin-snapshots -S'
  // capture the element screenshot and
  // compare to the baseline image

Which if attempted with any recent version of Cypress (> 2020) will give this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: my-project@1.0.0
npm ERR! Found: cypress@12.6.0
npm ERR! node_modules/cypress
npm ERR!   dev cypress@"^12.6.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer cypress@"^4.5.0" from cypress-plugin-snapshots@1.4.4
npm ERR! node_modules/cypress-plugin-snapshots
npm ERR!   cypress-plugin-snapshots@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Because of this line in that plugin's package.json:

  "peerDependencies": {
    "cypress": "^4.5.0"
  },

I think there is no purpose on having instructions for a command that won't work if attempted. This Issue is to ask if it can be removed so the next person can focus on visual testing plugins that are maintained.

rafaelbeckel commented 1 year ago

+1 to this.

The same issue is raised here too: https://github.com/cypress-io/cypress-documentation/issues/5073.

MikeMcC399 commented 1 year ago
nagash77 commented 1 year ago

@dwilches thank you for reporting this bug. If you would like to make a PR we would gladly accept it.