-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Queries, Detached DOM, and Retry-Ability (#4835)
* First rework of retryability guide * Update each command's Yields section, and all guides, with information about queries vs commands * Add Custom Queries page * Minor formatting tweaks * Review changes * Review updates * Update based on review + last week meetings * More review updates * Fix tests
- Loading branch information
1 parent
77d5db3
commit 7cb3c06
Showing
111 changed files
with
1,366 additions
and
1,173 deletions.
There are no files selected for viewing
Binary file removed
BIN
-86.5 KB
assets/img/guides/references/cy-method-failed-element-is-detached.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-462 KB
assets/img/guides/retry-ability/v10/alternating-commands-assertions.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,20 @@ title: blur | |
|
||
Blur a focused element. | ||
|
||
It is [unsafe](/guides/core-concepts/retry-ability#Only-queries-are-retried) to | ||
chain further commands that rely on the subject after `.blur()`. | ||
|
||
<Alert type="warning"> | ||
|
||
This element must currently be in focus. If you want to ensure an element is | ||
focused before blurring, try using [`.focus()`](/api/commands/focus) before | ||
`.blur()`. | ||
|
||
```javascript | ||
cy.get('button').as('btn').focus() | ||
cy.get('@btn').blur() | ||
``` | ||
|
||
</Alert> | ||
|
||
## Syntax | ||
|
@@ -24,8 +32,8 @@ focused before blurring, try using [`.focus()`](/api/commands/focus) before | |
**<Icon name="check-circle" color="green"></Icon> Correct Usage** | ||
|
||
```javascript | ||
cy.get('[type="email"]').type('[email protected]').blur() // Blur email input | ||
cy.get('[tabindex="1"]').focus().blur() // Blur el with tabindex | ||
cy.get('[type="email"]').blur() // Blur email input | ||
cy.get('[tabindex="1"]').blur() // Blur el with tabindex | ||
``` | ||
|
||
**<Icon name="exclamation-triangle" color="red"></Icon> Incorrect Usage** | ||
|
@@ -49,8 +57,9 @@ Pass in an options object to change the default behavior of `.blur`. | |
|
||
### Yields [<Icon name="question-circle"/>](/guides/core-concepts/introduction-to-cypress#Subject-Management) | ||
|
||
<List><li>`.blur()` yields the same subject it was given from the previous | ||
command.</li></List> | ||
- `.blur()` yields the same subject it was given. | ||
- It is [unsafe](/guides/core-concepts/retry-ability#Only-queries-are-retried) | ||
to chain further commands that rely on the subject after `.blur()`. | ||
|
||
## Examples | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.