cypress-io / cypress-documentation

Cypress Documentation including Guides, API, Plugins, Examples, & FAQ.
https://docs.cypress.io
MIT License
930 stars 1.04k forks source link

Confusing documentation at click retry #5308

Open LarsFlieger opened 1 year ago

LarsFlieger commented 1 year ago

Description

When I go to the click docs click#Assertions under it says ".click()will automatically retry until all chained assertions have passed." At core-concepts/retry-ability it says "Cypress will not retry the .click() action command, because it could change something in the application."

URL of Issue(s)

https://docs.cypress.io/api/commands/click#Assertions-Icon-namequestion-circle

Steps to replicate

  1. Go to '.click()will automatically retry until all chained assertions have passed.'
  2. Click on 'retry' https://docs.cypress.io/guides/core-concepts/retry-ability
  3. Scroll down to 'Only queries are retried' https://docs.cypress.io/guides/core-concepts/retry-ability#Only-queries-are-retried
  4. See error (Cypress will not retry the .click() action command, because it could change something in the application.)

Browser

No response

Device

Additional Information

No response

elylucas commented 1 year ago

@AtofStryker The comments in the click api doc don't seem correct. Could you verify if thats the case, and if so, I'll update the doc.

AtofStryker commented 1 year ago

@elylucas I don't think click is retry-able in the sense of query commands since it is an action and can't be chained off of, but is does retry in the case the dom is being reloaded or something else that is preventing the action. However, once the action is complete, pass or fail, it should not be retired (assuming I understand this correctly from the tests I read through)

thumbsupep commented 2 months ago

The docs still say .click()will automatically retry until all chained assertions have passed. So we are allowed to chain off of click? And then click should automatically retry until chained assertions pass? I'm still confused :(

If there are no chained assertions that users can add to click, can we remove this doc? Thanks!!