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

Unbreak Cypress.Commands.add({ hover }) #18941

Closed
flotwig opened this issue Nov 16, 2021 · 3 comments
Closed

Unbreak Cypress.Commands.add({ hover }) #18941

flotwig opened this issue Nov 16, 2021 · 3 comments
Labels
type: breaking change Requires a new major release version

Comments

@flotwig
Copy link
Contributor

flotwig commented Nov 16, 2021

Current behavior

Cypress.Commands.add({ hover }) errors since we have it stubbed out to throw an error: cypress-io/cypress-documentation#4208

The intent seems to be to add discoverability to the fact that Cy does not support hover OOTB. #10 But it confuses users to have to use .overwrite for this, and it's weird.

We have docs for it too: https://docs.cypress.io/api/commands/hover

Desired behavior

Until Cypress officially adds #10, either:

  1. Remove cy.hover() completely, and move the docs for it to a guide, like how we document other tasks you can do in Cypress. Trust that users will Google for it.
  2. Keep cy.hover() for IntelliSense and docs, and still throw, but have a special case to allow Cypress.Commands.add() to add it so you don't need to overwrite a no-op command?
  3. Some other choice that resolves this incongruity

Test code to reproduce


Cypress Version

9.0.0

Other

No response

@jennifer-shehane
Copy link
Member

Yes, I think it's weird that we have a weird command and docs that doesn't work. But the core of this was to encourage discoverability I suppose - that there are workarounds to hover available that they could look into. Just want to consider that in the solution.

@emilyrohrbough
Copy link
Member

emilyrohrbough commented Mar 11, 2022

This was handled in #19633 and will be released in 10.0.

@emilyrohrbough
Copy link
Member

This was released in 10.0.0. Verified in Cypress 11.1.0 that this does not error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: breaking change Requires a new major release version
Projects
None yet
Development

No branches or pull requests

3 participants