-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs: Add best practices for element interaction patterns and command chaining #6242
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
base: main
Are you sure you want to change the base?
Conversation
👷 Deploy request for cypress-docs pending review.Visit the deploys page to approve it
|
|
```js | ||
describe('form interaction', () => { | ||
it('updates input field correctly', () => { | ||
cy.get('[data-cy="email-input"]') | ||
.should('be.visible') | ||
.focus() | ||
.clear() | ||
.type('[email protected]') | ||
.should('have.value', '[email protected]') | ||
.blur() | ||
}) | ||
}) | ||
``` |
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 proposed addition to the documentation contradicts other information about chaining.
The example code does not follow the rules set out in Actions should be at the end of chains, not the middle
and the "unsafe to chain" comments in:
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.
I added a comment about chaining, although I don't have the background to comment on your complete documentation section. The chaining part would need to be revised in order to be correct.
closes #6189