docs: rename helper icons for clarity, use argument

This commit is contained in:
Brian Mann
2017-06-24 15:54:35 -04:00
parent 601ef95035
commit db65b0576a
79 changed files with 168 additions and 169 deletions

View File

@@ -23,30 +23,31 @@ function fa (hexo, args) {
return `<i class="fa ${classNames}"></i>`
}
function yields (hexo) {
// {% yields %}
function helperIcon (hexo, args) {
// {% helper_icon yields %}
// {% helper_icon timeout %}
// {% helper_icon defaultAssertion %}
return helperIconUrl.call(this, hexo, 'introduction-to-cypress#Subject-Management')
}
const type = args[0]
function timeout (hexo) {
// {% timeout %}
switch (type) {
case 'yields':
return helperIconUrl.call(this, hexo, 'introduction-to-cypress#Subject-Management')
return helperIconUrl.call(this, hexo, 'introduction-to-cypress#Timeouts')
}
case 'timeout':
return helperIconUrl.call(this, hexo, 'introduction-to-cypress#Timeouts')
function defaultAssertion (hexo) {
// {% default_assertion %}
case 'defaultAssertion':
return helperIconUrl.call(this, hexo, 'introduction-to-cypress#Default-Assertions')
return helperIconUrl.call(this, hexo, 'introduction-to-cypress#Default-Assertions')
default:
// error when an invalid usage option was provided
throw new Error(`{% helper_icon %} tag helper was provided an invalid type: ${type}`)
}
}
module.exports = {
fa,
yields,
timeout,
defaultAssertion,
helperIcon,
}

View File

@@ -9,7 +9,7 @@ const note = require('../lib/tags/note')
const usageOptions = require('../lib/tags/usage')
const { issue, openAnIssue } = require('../lib/tags/issues')
const { url, urlHash } = require('../lib/tags/url')
const { fa, yields, timeout, defaultAssertion } = require('../lib/tags/icons')
const { fa, helperIcon } = require('../lib/tags/icons')
const tags = {
// partials
@@ -21,9 +21,7 @@ const tags = {
// icons
fa: fa,
yields: yields,
timeout: timeout,
default_assertion: defaultAssertion,
helper_icon: helperIcon,
// usage_options
usage_options: usageOptions,

View File

@@ -44,11 +44,11 @@ Option | Default | Notes
`offset` | `{top: 0, left: 0}` | Amount to scroll after the element has been scrolled into view
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry the scroll
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.scrollIntoView()` yields the DOM element that was scrolled into view.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.scrollIntoView()` will continue to scroll the element into view for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -56,11 +56,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry the scroll
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.scrollTo()` yields the window or DOM element that was scrolled.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.scrollTo()` will wait until the window or element is in a 'scrollable' state for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %} or the duration of the `timeout` specified in the command's options.

View File

@@ -67,11 +67,11 @@ Option | Default | Notes
You can also include arbitrary event properties (e.g. `clientX`, `shiftKey`) and they will be attached to the event. Passing in coordinate arguments (`clientX`, `pageX`, etc) will override the position coordinates.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.trigger()` yields the DOM subject chained from the previous command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.trigger()` will wait until the element is in an 'interactable' state for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %} or the duration of the `timeout` specified in the command's options.

View File

@@ -57,7 +57,7 @@ A method to be called on the chainer.
Pass a function that can have any number of explicit assertions within it. Whatever was passed to the function is what is yielded.
## Yields {% yields %}
## Yields {% helper_icon yields %}
In most cases, `.and()` yields the previous cy command's yield.
@@ -76,7 +76,7 @@ cy
.and('have.css', 'font-family') // yields 'sans-serif'
```
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.and()` will continue to retry until none of the assertions throw for the duration of the previous cy commands `timeout`.

View File

@@ -40,11 +40,11 @@ cy.as('foo') // Errors, cannot be chained off 'cy'
The name of the alias to be referenced later within a {% url `cy.get()` get %} or {% url `cy.wait()` wait %} command using a `@` prefix.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.as()` yields the DOM element or route chained from the previous command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.as()` will retry the chain of commands before the `.as()` command for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}

View File

@@ -43,11 +43,11 @@ Option | Default | Notes
`force` | `false` | Forces blur, disables checking if el is focusable or focused
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.blur()` yields the DOM element that was blurred.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.blur()` will continue to look for the focusable element to blur for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -56,11 +56,11 @@ Option | Default | Notes
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry the check
## Yields {% yields %}
## Default {% default_assertion %}
## Default {% helper_icon defaultAssertion %}
`.check()` yields the DOM element(s) that were checked.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.check` will retry for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %} or the duration of the `timeout` specified in the command's options.

View File

@@ -46,11 +46,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element(s)
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.children()` yields the new DOM element(s) found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.children()` will continue to look for the children elements for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -49,11 +49,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry the clear
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.clear()` yields the `input` or `textarea` that was cleared.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.clear()` will continue to look for the `input` or `textarea` for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -42,11 +42,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `responseTimeout` configuration#Timeouts %} | Total time to wait for the `cy.clearCookie()` command to be processed
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.clearCookie()` yields `null`.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.clearCookie()` will wait up for the duration of {% url `responseTimeout` configuration#Timeouts %} for the automation server to process the command.

View File

@@ -37,11 +37,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `responseTimeout` configuration#Timeouts %} | Total time to wait for the `cy.clearCookies()` command to be processed
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.clearCookies()` yields `null`.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.clearCookies()` will wait up for the duration of {% url `responseTimeout` configuration#Timeouts %} for the automation server to process this command.

View File

@@ -32,11 +32,11 @@ cy.clearLocalStorage() // clear all local storage
Specify keys to be cleared in local storage.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.clearLocalStorage()` yields the remove local storage object.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.clearLocalStorage()` will wait up for the duration of {% url `defaultCommandTimeout` configuration#Timeouts %} to process this command.

View File

@@ -63,11 +63,11 @@ Option | Default | Notes
`multiple` | `false` | Enable serially clicking multiple elements
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry the click
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.click()` yields the element that was clicked.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.click()` will wait until the element is in a 'clickable' state for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %} or the duration of the `timeout` specified in the command's options.

View File

@@ -52,7 +52,7 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.clock()` yields a `clock` object with the following methods:

View File

@@ -44,11 +44,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.closest()` yields the new DOM elements found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.closest()` will continue to look for the closest element for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -50,11 +50,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry finding an element containing the content
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.contains()` yields the *first*, *deepest* DOM element containing the text.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.contains()` will try to find the content within the DOM for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -41,11 +41,11 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.dblclick()` yields the DOM element that was double clicked.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.dblclick()` will wait for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -37,7 +37,7 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.debug()` yields the previous command's yield.

View File

@@ -32,11 +32,11 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.document()` yields the `window.document` object.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.document()` will retry for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -40,7 +40,7 @@ Pass a function that is invoked with the following arguments:
- `index`
- `collection`
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.each()` yields the original array.

View File

@@ -28,7 +28,7 @@ cy.contains('ul').end() // Yield 'null' instead of 'ul' element
cy.end() // Does not make sense to chain off 'cy'
```
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.end()` yields `null`.

View File

@@ -51,11 +51,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.eq()` yields the new DOM elements found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.eq()` will continue to look for the element at the specified index for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -39,7 +39,7 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `execTimeout` configuration#Timeouts %} | Total time to allow the command to execute
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.exec()` yields an object with the following properties:
@@ -47,7 +47,7 @@ Option | Default | Notes
- `stdout`
- `stderr`
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.exec()` will allow the command to execute for the duration of the {% url `execTimeout` configuration#Timeouts %} or the `timeout` passed into the command's options.

View File

@@ -48,11 +48,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.filter()` yields the new DOM elements found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.filter()` will continue to look for the filtered element(s) for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -44,11 +44,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element(s)
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.find()` yields the new DOM elements found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.find()` will continue to look for the filtered element(s) for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -40,11 +40,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.first()` yields the new DOM element found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.first()` will continue to look for the first element for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -63,11 +63,11 @@ Option | Default | Notes
--- | --- | ---
`timeout` | {% url `responseTimeout` configuration#Timeouts %} | Total time to wait for the command to be processed
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.fixture()` yields the contents of the file. Formatting is determined by it's file extension.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.fixture` will wait up for the duration of {% url `responseTimeout` configuration#Timeouts %} for the server to process the command.

View File

@@ -39,11 +39,11 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.focus()` yields the new DOM element that was focused.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.focus()` will continue to try to focus the element for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -32,11 +32,11 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.focused()` yields the DOM element that is currently focused.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.focused()` will continue to look for the focused element for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -49,11 +49,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.get()` yields the new DOM element(s) found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.get()` will continue to look for the elements for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -37,7 +37,7 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `responseTimeout` configuration#Timeouts %} | Total time to wait for the `cy.getCookie()` command to be processed
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.getCookie()` yields a cookie object literal with the following properties:
@@ -49,7 +49,7 @@ Option | Default | Notes
- `secure`
- `expiry`
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.getCookie()` will continue to look for the cookie for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -33,7 +33,7 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `responseTimeout` configuration#Timeouts %} | Total time to wait for the `cy.getCookies()` command to be processed
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.getCookies()` yields an array cookie objects. Each cookie object has the following properties:
@@ -45,7 +45,7 @@ Option | Default | Notes
- `secure`
- `expiry`
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.getCookies()` will continue to look for cookies for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -40,11 +40,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `pageLoadTimeout` configuration#Timeouts %} | Total time to retry the navigation
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.go()` yields the `window` object.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.go()` will retry for the duration of the {% url `pageLoadTimeout` configuration#Timeouts %} or the duration of the `timeout` specified in the command's options.

View File

@@ -38,11 +38,11 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.hash()` yields the current URL hash as a string including the `#` character. If no `#` character is present in the URL, then an empty string will be returned.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -44,11 +44,11 @@ Name of function to be invoked.
Additional arguments to be given to the function call. There is no limit to the number of arguments.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.invoke()` yields the return value of the invoked property.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -39,11 +39,11 @@ cy.clearCookies().its('length') // Errors, 'clearCookies' does not yield Object
Name of property or nested properties (with dot notation) to get.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.invoke()` yields the value of the property.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -40,11 +40,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.last()` yields the new DOM element found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.last()` will continue to look for the last element for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -38,7 +38,7 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.location()` yields the location object with the following properties:
@@ -53,7 +53,7 @@ Option | Default | Notes
- `search`
- `toString`
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -32,11 +32,11 @@ Message to be printed to Cypress Command Log.
Additional arguments to be printed to the Cypress Command Log. There is no limit to the number of arguments.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.log()` yields `null`.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -46,11 +46,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.next()` yields the new DOM element(s) found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.next()` will continue to look for the next element for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -46,11 +46,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.nextAll()` yields the new DOM elements found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.nextAll()` will continue to look for all next element(s) for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -57,11 +57,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element(s)
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.nextUntil()` yields the new DOM element(s) found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.nextUntil()` will continue to look for the next element(s) for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -48,11 +48,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.not()` yields the new DOM element(s) without the selector provided in the command's argument.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.not()` will continue to look for the element(s) for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -46,11 +46,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.parent()` yields the new DOM element(s) found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.parent()` will continue to look for the parent element(s) for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -47,11 +47,11 @@ Option | Default | Notes
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the elements
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.parents()` yields the new DOM element(s) found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.parents()` will continue to look for the next element(s) for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -56,11 +56,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element(s)
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.parentsUntil()` yields the new DOM element(s) found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.parentsUntil()` will continue to look for the parent element(s) for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -37,11 +37,11 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.pause()` yields the previous command's yield.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -46,11 +46,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.prev()` yields the new DOM element(s) found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.prev()` will continue to look for the previous element for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -46,11 +46,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.prevAll()` yields the new DOM element(s) found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.prevAll()` will continue to look for the previous elements for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -56,11 +56,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element(s)
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.prevUntil()` yields the new DOM element(s) found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.prevUntil()` will continue to look for the previous element(s) for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -54,11 +54,11 @@ Option | Default | Notes
--- | --- | ---
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to wait for the command to be processed
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.readFile()` yields the contents of the file.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.readFile()` will wait up for the duration of {% url `defaultCommandTimeout` configuration#Timeouts %} for the server to process the command.

View File

@@ -37,11 +37,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `pageLoadTimeout` configuration#Timeouts %} | Total time to reload the page
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.reload()` yields the `window` object of the newly loaded page.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.reload()` will wait for the load event of the newly loaded page for the duration of the {% url `pageLoadTimeout` configuration#Timeouts %} or the duration of the `timeout` specified in the command's options.

View File

@@ -85,7 +85,7 @@ Option | Default | Notes
You can also set options for `cy.request`'s `baseUrl` and `responseTimeout` globally in {% url 'configuration' configuration %}.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.request()` yields the `response` as an object literal containing properties such as:
@@ -94,7 +94,7 @@ You can also set options for `cy.request`'s `baseUrl` and `responseTimeout` glob
- `headers`
- `duration`.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.request()` will wait for the response for the duration of the {% url `responseTimeout` configuration#Timeouts %} or the `timeout` passed in the options object of the command.

View File

@@ -36,13 +36,13 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.root()` yields the root element regardless of what was yielded from a previous command.
The root element yielded is `document` by default. However, when calling `.root()` from within the callback function of a {% url `.within()` within %} command, the root element yielded is the yielded subject of the {% url `.within()` within %} command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.root()` will continue to look for the root element for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -67,9 +67,9 @@ Option | Default | Notes
You can also set options for all {% url `cy.wait()` wait %}'s `requestTimeout` and `responseTimeout` globally in {% url 'configuration' configuration %} to control how long to wait for the request and response of a supplied route.
## Yields {% yields %}
## Yields {% helper_icon yields %}
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -39,11 +39,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `responseTimeout` configuration#Timeouts %} | Total time to wait for the automation server to process the command.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.screenshot()` yields `null`.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.screenshot()` will wait up for the duration of {% url `responseTimeout` configuration#Timeouts %} for the automation server to process this command.

View File

@@ -53,11 +53,11 @@ Option | Default | Notes
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry the select
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.select()` yields the new DOM elements selected.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.select()` will continue to select the options for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -59,11 +59,11 @@ Option | Default | Notes
`urlMatchingOptions` | `{ matchBase: true }` | The default options passed to `minimatch` when using glob strings to match URLs
`whitelist` | function | Callback function that whitelists requests from ever being logged or stubbed. By default this matches against asset-like requests such as for `.js`, `.jsx`, `.html`, and `.css` files.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.server()` yields the Cypress server instance.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -46,7 +46,7 @@ Option | Default | Notes
`secure` | `false` | Whether the cookie is a secure cookie
`timeout` | {% url `responseTimeout` configuration#Timeouts %} | Total time to wait for the `cy.setCookie()` command to be processed
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.setCookie()` yields a cookie object literal with the following properties:
@@ -58,7 +58,7 @@ Option | Default | Notes
- `secure`
- `expiry`
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.setCookie()` will wait up for the duration of {% url `responseTimeout` configuration#Timeouts %} for the automation server to process this command.

View File

@@ -57,7 +57,7 @@ A method to be called on the chainer.
Pass a function that can have any number of explicit assertions within it. Whatever was passed to the function is what is yielded.
## Yields {% yields %}
## Yields {% helper_icon yields %}
In most cases, `.should()` yields the previous cy command's yield.
@@ -76,7 +76,7 @@ cy
.should('have.css', 'font-family') // yields 'sans-serif'
```
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.should()` will continue to retry until none of the assertions throw for the duration of the previous cy commands `timeout`.

View File

@@ -47,11 +47,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry getting the element
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.siblings()` yields the new DOM elements found by the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.siblings()` will continue to look for the sibling element(s) for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -38,11 +38,11 @@ cy.location().spread() // Errors, 'location' does not yield an array
Pass a function that expands the array into it's arguments.
## Yields {% yields %}
## Yields {% helper_icon yields %}
Whatever was passed to the function is what is yielded.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -35,13 +35,13 @@ The `object` that has the `method` to be wrapped.
The name of the `method` on the `object` to be wrapped.
## Yields {% yields %}
## Yields {% helper_icon yields %}
Unlike most Cypress commands, `cy.spy()` is *synchronous* and returns a value (the spy) instead of a Promise-like chain-able object.
`cy.spy()` returns a [Sinon.js spy](http://sinonjs.org/docs/#spies). All [methods](http://sinonjs.org/docs/#spies-api) found on Sinon.JS spies are supported.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -41,13 +41,13 @@ The name of the `method` on the `object` to be wrapped.
The function used to replace the `method` on the `object`.
## Yields {% yields %}
## Yields {% helper_icon yields %}
Unlike most Cypress commands, `cy.stub()` is *synchronous* and returns a value (the stub) instead of a Promise-like chain-able object.
`cy.stub()` returns a {% url "Sinon.js stub" http://sinonjs.org/%}. All methods found on {% url "Sinon.js" http://sinonjs.org %} spies and stubs are supported.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -35,11 +35,11 @@ cy.get('input').submit() // Errors, 'input' does not yield a form
Pass in an options object to change the default behavior of `.submit()`.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.submit()` yields the form that was submitted.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.submit()` will continue to try to submit the form for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -37,7 +37,7 @@ Option | Default | Notes
--- | --- | ---
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to yield the then
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.then()` is modeled identically to the way Promises work in JavaScript. Whatever is returned from the callback function becomes the new subject and will flow into the next command (with the exception of `null` and `undefined`).
@@ -45,7 +45,7 @@ When `null` or `undefined` are returned by the callback function, the subject wi
Just like Promises, you can return any compatible "thenable" (anything that has a `.then()` interface) and Cypress will wait for that to resolve before continuing forward through the chain of commands.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.then()` will retry for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %} or the duration of the `timeout` specified in the command's [options](#options).

View File

@@ -31,7 +31,7 @@ cy.tick(500)
The number of `milliseconds` to move the clock. Any timers within the affected range of time will be called.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.tick()` yields a `clock` object with the following methods:

View File

@@ -33,11 +33,11 @@ Option | Default | Notes
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.title()` yields the `document` title as a string.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.title()` will continue to retry for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}

View File

@@ -72,11 +72,11 @@ Option | Default | Notes
`release` | `true` | Keep a modifier activated between commands
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to retry the type
## Yields {% yields %}
## Yields {% helper_icon yields %}
`.type()` yields the DOM element that was typed into.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`.type()` will continue to retry typing for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -38,11 +38,11 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.url()` yields the current URL as a string.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -68,11 +68,11 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.viewport()` yields `null`.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -41,11 +41,11 @@ Option | Default | Notes
You can also set all `cy.visit()` commands' `pageLoadTimeout` and `baseUrl` globally in {% url 'configuration' configuration %}.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.visit()` yields the remote `window` object.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.visit()` will retry for the duration of the {% url `pageLoadTimeout` configuration#Timeouts %} or the duration of the `timeout` specified in the command's [options](#options).

View File

@@ -56,13 +56,13 @@ Option | Default | Notes
You can also change the `requestTimeout` and `responseTimeout` globally for all `cy.wait()` commands in the {% url 'configuration' configuration %}.
## Yields {% yields %}
## Yields {% helper_icon yields %}
When given a `time` argument, `cy.wait()` yields the previous commands yield.
When given an `alias` argument, `cy.wait()` yields the XHR object of the aliased route.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.wait()` will wait for the request the duration of the {% url `requestTimeout` configuration#Timeouts %} and wait for the response for the duration of the {% url `responseTimeout` configuration#Timeouts %} or it will wait for the duration of both the request and response for the `timeout` specified in the command's [options](#options).

View File

@@ -32,11 +32,11 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.window()` yields the `window` object.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.window()` will retry for the duration of the {% url `defaultCommandTimeout` configuration#Timeouts %}.

View File

@@ -43,9 +43,9 @@ Option | Default | Notes
--- | --- | ---
`log` | `false` | Display command in command log
## Yields {% yields %}
## Yields {% helper_icon yields %}
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -36,11 +36,11 @@ Option | Default | Notes
--- | --- | ---
`log` | `true` | Whether to display command in Command Log
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.wrap()` yields the object that was passed into the command.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
# Examples

View File

@@ -58,11 +58,11 @@ Option | Default | Notes
--- | --- | ---
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | Total time to wait for the command to be processed.
## Yields {% yields %}
## Yields {% helper_icon yields %}
`cy.writeFile()` yields the contents written to the file.
## Timeout {% timeout %}
## Timeout {% helper_icon timeout %}
`cy.writeFile()` will wait up for the duration of {% url `defaultCommandTimeout` configuration#Timeouts %} for the server to write to the file.