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

Update docs for Cypress.require() #5020

Merged
merged 13 commits into from
Feb 13, 2023

Conversation

chrisbreiding
Copy link
Contributor

Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

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

Just a reminder for us whenever we create the 12.6 docs branch to base this PR off of it to merge

docs/api/commands/origin.mdx Outdated Show resolved Hide resolved
@vercel
Copy link

vercel bot commented Jan 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
cypress-documentation ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 10, 2023 at 5:19PM (UTC)

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

@chrisbreiding It might be nice to have a 'why' explaining why this is necessary somewhere in the Cypress.require doc, in a notes section? I think my immediate thoughts if I were to read this for the first time would be....why?? why do I have to do this?? There's no context given, we just tell them they have to.

@chrisbreiding
Copy link
Contributor Author

@chrisbreiding It might be nice to have a 'why' explaining why this is necessary somewhere in the Cypress.require doc, in a notes section? I think my immediate thoughts if I were to read this for the first time would be....why?? why do I have to do this?? There's no context given, we just tell them they have to.

Addressed in b98b945.

@jennifer-shehane
Copy link
Member

@chrisbreiding Thanks, the 'why' section is nice context. Will leave it to other to fully review the content.

cy.origin('somesite.com', () => {
const _ = require('lodash')
const utils = require('../support/utils')
const _ = Cypress.require('lodash')
Copy link
Member

Choose a reason for hiding this comment

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

one can still use Cypress._ here if they wanted to right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, they can

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.

4 participants