From a89c50f1a6c03fccb359debf6bd578921998cd90 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Wed, 24 May 2017 13:08:14 -0400 Subject: [PATCH] Updated some incorrect chainers off of .contains() --- docs/source/api/commands/click.md | 6 +++--- docs/source/api/commands/contains.md | 2 +- docs/source/api/commands/first.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/api/commands/click.md b/docs/source/api/commands/click.md index dabb6892c8..0f1c3fc46c 100644 --- a/docs/source/api/commands/click.md +++ b/docs/source/api/commands/click.md @@ -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** diff --git a/docs/source/api/commands/contains.md b/docs/source/api/commands/contains.md index 066182bd45..9b9872378c 100644 --- a/docs/source/api/commands/contains.md +++ b/docs/source/api/commands/contains.md @@ -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** diff --git a/docs/source/api/commands/first.md b/docs/source/api/commands/first.md index 390023b431..8b635fa68b 100644 --- a/docs/source/api/commands/first.md +++ b/docs/source/api/commands/first.md @@ -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