mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-19 06:38:45 -05:00
91bb010fd6
- go into more detail on trigger vs action commands - explain actionability further - better format notes + examples - consistent no arg / arg examples - es6 all the functions - remove duplicated intractability content - remove simulated events garbage - go into more detail on pseudo action commands - much better cy.contains usage
543 B
543 B
What's the difference between .then() and .should()/.and()?
Using .then() simply allows you to use the yielded subject in a callback function and should be used when you need to manipulate some values or do some actions.
When using a callback function with .should() or .and(), on the other hand, there is special logic to rerun the callback function until no assertions throw within it. You should be careful of side affects in a .should() or .and() callback function that you would not want performed multiple times.