cypress-documentation icon indicating copy to clipboard operation
cypress-documentation copied to clipboard

Confusing documentation at click retry

Open LarsFlieger opened this issue 2 years ago • 3 comments

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

  • [ ] PC
  • [ ] Mac
  • [ ] iPhone
  • [ ] iPad
  • [ ] Android Phone
  • [ ] Android Tablet

Additional Information

No response

LarsFlieger avatar Jun 14 '23 09:06 LarsFlieger

@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.

elylucas avatar Jun 23 '23 16:06 elylucas

@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)

AtofStryker avatar Jun 26 '23 18:06 AtofStryker

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!!

thumbsupep avatar Jun 14 '24 20:06 thumbsupep