Updated some incorrect chainers off of .contains()

This commit is contained in:
Jennifer Shehane
2017-05-24 13:08:14 -04:00
parent f19a92b6c2
commit a89c50f1a6
3 changed files with 5 additions and 5 deletions

View File

@@ -24,9 +24,9 @@ Click a DOM element. The DOM element must be in a "clickable" state prior to th
**{% fa fa-check-circle green %} Valid Usage**
```javascript
cy.get('button').click() // Clicks on button
cy.focused().click() // Clicks on el with focus
cy.contains('Welcome').first().click() // Clicks on first el containing 'Welcome'
cy.get('button').click() // Clicks on button
cy.focused().click() // Clicks on el with focus
cy.contains('Welcome').click() // Clicks on first el containing 'Welcome'
```
**{% fa fa-exclamation-triangle red %} Invalid Usage**

View File

@@ -22,7 +22,7 @@ cy.contains(selector, content, options)
```javascript
cy.get('.nav').contains('About') // Yields el in .nav containing 'About'
cy.contains('Hello').first() // Yields first el in document containing 'Hello'
cy.contains('Hello') // Yields first el in document containing 'Hello'
```
**{% fa fa-exclamation-triangle red %} Invalid Usage**

View File

@@ -48,7 +48,7 @@ Option | Default | Notes
## Timeout
`.first` will continue to look for the first element for the duration of the [`defaultCommandTimeout`](https://on.cypress.io/guides/configuration#timeouts)
`.first()` will continue to look for the first element for the duration of the [`defaultCommandTimeout`](https://on.cypress.io/guides/configuration#timeouts)
# Examples