-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Note Cypress.Commands.add()
error
#5163
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
Conversation
|
||
::: | ||
|
||
:::caution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of a callout half way down the page, can we just add it to the explanation of the two options for adding custom commands in the initial description before we list the syntax? https://docs.cypress.io/api/cypress-api/custom-commands
I would expect this up-front as an unfamiliar user so I knew what I needed to read and care about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like:
There are two API available for adding custom commands:
- Cypress.Commands.add() - use to add a custom command to use when writing tests
- Cypress.Command.overwrite() - use to override and existing built-in Cypress command or reserved internal function. Caution this overrides it for Cypress as well and could impact how Cypress behaves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call 👍
|
||
::: | ||
|
||
:::caution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move above the info banner & just add to the text without the banner at all? Doesn't seem worthy calling out so loudly since this is what the doc is about
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dig it
848297d
to
f404b5e
Compare
This is a reimplementation in the new site of an older PR that never made it in.