Skip to content

Conversation

jaffrepaul
Copy link
Contributor

This is a reimplementation in the new site of an older PR that never made it in.


:::

:::caution
Copy link
Member

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.

Copy link
Member

@emilyrohrbough emilyrohrbough Apr 6, 2023

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call 👍


:::

:::caution
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dig it

@jaffrepaul jaffrepaul force-pushed the add-existing-commands branch from 848297d to f404b5e Compare April 6, 2023 18:10
@jaffrepaul jaffrepaul merged commit 2cc9f36 into main Apr 6, 2023
@jaffrepaul jaffrepaul deleted the add-existing-commands branch April 6, 2023 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants