Skip to content
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

Break best practices into subpages #5132

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

jaffrepaul
Copy link
Member

No description provided.

@jaffrepaul jaffrepaul marked this pull request as draft March 21, 2023 19:04
Copy link
Member Author

@jaffrepaul jaffrepaul left a comment

Choose a reason for hiding this comment

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

asfjhbajhbfalv


:::tip

&#8239;<Icon name="check-circle" color="green" /> **Best Practice:** Use
Copy link
Member Author

Choose a reason for hiding this comment

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

LGTM 🎉

Copy link
Member Author

@jaffrepaul jaffrepaul left a comment

Choose a reason for hiding this comment

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

aS


:::

Many first time users look at Cypress code and think it runs synchronously.
Copy link
Member Author

Choose a reason for hiding this comment

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

uyADgckv


// Instead, do this.
cy.get('a').as('links')
cy.get('@links').first().click()
Copy link
Member Author

Choose a reason for hiding this comment

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

here too

// THE WAY YOU THINK IT DOES.
const a = cy.get('a')

cy.visit('https://example.cypress.io')
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
cy.visit('https://example.cypress.io')
cy.visit('https://example.cypress.io/home')

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.

None yet

1 participant