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 auth examples for v12 on custom commands page #4894

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

debrisapron
Copy link
Contributor

Closes #4508

@vercel
Copy link

vercel bot commented Dec 4, 2022

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

Name Status Preview Updated
cypress-documentation ✅ Ready (Inspect) Visit Preview Dec 4, 2022 at 10:54PM (UTC)

})
```

```js
cy.typeLogin({ email: '[email protected]', password: 'Secret1' })
cy.loginViaUi({ email: '[email protected]', password: '$ecret1', name: 'johndoe' })
Copy link
Contributor

Choose a reason for hiding this comment

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

should we also have a loginViaCyOrigin type example here as well that looks similar to the loginViaUI to help give users a pattern to follow?

Copy link
Contributor

Choose a reason for hiding this comment

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

it would probably be a light version of what we have with the auth0/okta/cognito guides to show a general cy.origin pattern with cy.session

cy.get('input[name=email]').type(user.email)

cy.get('input[name=password]').type(user.password)
Cypress.Commands.add('loginViaUi', (user) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Cypress.Commands.add('loginViaUi', (user) => {
Cypress.Commands.add('loginViaUI', (user) => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

})
```

```js
cy.typeLogin({ email: '[email protected]', password: 'Secret1' })
cy.loginViaUi({ email: '[email protected]', password: '$ecret1', name: 'johndoe' })
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cy.loginViaUi({ email: '[email protected]', password: '$ecret1', name: 'johndoe' })
cy.loginViaUI({ email: '[email protected]', password: '$ecret1', name: 'johndoe' })

@debrisapron
Copy link
Contributor Author

Merging this for now, will revisit this content later

@debrisapron debrisapron merged commit 6a3f8fd into v12 Dec 5, 2022
@debrisapron debrisapron deleted the content/update-custom-command-examples branch December 5, 2022 20:23
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.

2 participants