-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
}) | ||
``` | ||
|
||
```js | ||
cy.typeLogin({ email: '[email protected]', password: 'Secret1' }) | ||
cy.loginViaUi({ email: '[email protected]', password: '$ecret1', name: 'johndoe' }) |
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.
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?
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.
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) => { |
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.
Cypress.Commands.add('loginViaUi', (user) => { | |
Cypress.Commands.add('loginViaUI', (user) => { |
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.
This is holy war material mate! https://google.github.io/styleguide/jsguide.html#naming-camel-case-defined
}) | ||
``` | ||
|
||
```js | ||
cy.typeLogin({ email: '[email protected]', password: 'Secret1' }) | ||
cy.loginViaUi({ email: '[email protected]', password: '$ecret1', name: 'johndoe' }) |
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.
cy.loginViaUi({ email: '[email protected]', password: '$ecret1', name: 'johndoe' }) | |
cy.loginViaUI({ email: '[email protected]', password: '$ecret1', name: 'johndoe' }) |
Merging this for now, will revisit this content later |
Closes #4508