mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-22 16:18:45 -05:00
7.1 KiB
7.1 KiB
TODO:
- lifecycle events
- cy.trigger
- event firing (simulated)
FAQ
- add support question in Company?
Intro to Cypress
- we don't ever describe assertions as 'blocking / guarding state'
- we need to mention this too in the
shouldandanddocs- (there is a note for this below)
- finish the new assertion bits
- implicit / default assertions
- everything is retried
- assertions act like guards
- talk about 'not.exist' <-- this is completely missing!
- mention it in two places, 'up top / down below'
<!-- - they have promise like qualities but are different -->
Command Creation
-
declaratively talk about assertions
-
Cypress.Commands.add('foo', { assertions: 'retry' })
-
Cypress.Commands.add('foo', { assertions: true })
-
Cypress.Commands.add('foo', { assertions: false })
-
automatically add stuff about it existing
-
Cypress.Commands.add('foo', { assertionRequirements: 'dom / exists' })
-
Cypress.Commands.add('foo', { timeout: 60000 })
-
Cypress.Commands.add('foo', { allowsAliasing: true }) // can be aliased
-
Cypress.Commands.add('foo', { commandsAllowed: ['as'] }) // allow specific commands
-
Cypress.Commands.add('foo', { chainable: false }) // dont allow chaining
-
need to also take into accounts timeout
- with the default being defaultCommandTimeout
-
on.cypress.io
- add note in the readme that says
- DO NOT LINK TO HASH TAGS FROM THE DESKTOP app
- instead create a new link
- bad: https://on.cypress.io/guides/configuration#section-global
- good: https://on.cypress.io/guides/configuration-global
- always add the prefix
-
should / and
- talk about retrying
- make sure the intro to cypress explains this
-
FAQ
- Using Cypress dashboard questions -> move to dashboard
- Why are there weird questions about CI errors?
-
Aliasing
- explain how anything can be aliased
-
API docs
- make sure we explictly say that DOM commands yield a jquery wrapped object containing the collection of elements
-
Debugging
- invalid URL's not using the URL tag helper
-
Assertions
- Default assertions should move to the top of the assertion sections
- this couples nicely with the "you dont have to write assertions"
- then the next docs should be like: "okay so you want to write an assertion!"
- We still don't do a good / clear job explaining that assertions block cypress until that state is reached
- Why are we linking: "reach a desired state" to interacting with eleents?
- this should be linking to a section within assertions
- Default assertions should move to the top of the assertion sections
-
API
- What's the difference between a default assertion and an error?
- an error will fire IMMEDIATELY without waiting
- like you called .type() on an array or didnt pass in the right arguments
- a default assertion will automatically retry until the state matches and will wait
- its like its been added as an assertion after the command
- an error will fire IMMEDIATELY without waiting
- What's the difference between a default assertion and an error?