The Cypress documentation uses Hexo to convert Markdown documents to static HTML.
Hexo ships with lots of tags that extend Markdown with extra features.
Here's documentation for all the custom tags that we've created.
We didn't create the tags in this section—they ship with Hexo—but they're used all over the docs so here's the lowdown.
Insert the markup for an inline image.
{% img /img/examples/name-of-file.jpg "alt text describing img" %}<img src="/img/examples/name-of-file.jpg" alt="alt text describing img">We've created plenty of custom tags that Hexo loads from the libs/tags folder. Use 'em 'cos they give the docs a consistent look and feel.
Describe what assertions can be chained off a command.
{% assertions none cy.clearCookie %}<ul>
<li><p><code>cy.clearCookie()</code> cannot have any assertions chained.</p></li>
</ul>The following assertions are supported:
actionsexistenceitsnoneonceretryutilitywait
Builds a single changelog file from the contents of source/_changelogs
Insert a specific Font Awesome icon by name.
{% fa fa-check-circle green %}Use these icons to highlight important statements.
**{% fa fa-check-circle green %} Correct Usage**
**{% fa fa-exclamation-triangle red %} Incorrect Usage**
**{% fa fa-angle-right %} value** ***(String)***Insert a commonly used icon by name.
{% helper_icon yields %}The following icons are supported:
assertionsrequirementstimeoutyields
Link to an issue on Cypress's GitHub repository.
{% issue 74 "not currently supported" %}Display a block of content that visually stands out from the body of the text.
Most often used to call out warnings, useful info, and tips.
{% note warning 'Anti-Pattern' %}
We do not recommend starting a web server using `cy.task()`. Read about {% url 'best practices' best-practices#Web-Servers %} here.
{% endnote %}The first argument is required: it's used to style the block and add an appropriate icon. Use one of the following values:
infowarningsuccessdangerbolt
The second argument is optional: if present it's used as the title of the block.
Link to the issue creation page on Cypress's GitHub repository.
{% open_an_issue %}Typically used to make it easier for users to open issues.
At the moment, `mouseover` and `mouseout` events are *not* fired. {% open_an_issue %} if you need this to be fixed.Include the content of another file inline.
{% partial then_should_difference %}Describe a command's requirements.
{% requirements parent cy.clearCookie %}<ul>
<li><p><code>cy.clearCookie()</code> requires being chained off of <code>cy</code>.</p></li>
</ul>The following requirements are supported:
noneparentchilddomdualdual_existencedual_existence_single_domclearabilityblurabilityclearabilityfocusabilitycheckabilityselectabilityscrollabilitysubmitabilityspreadexectaskread_filewrite_filepagetickrequest
Describe a timeout.
{% timeouts existence cy.get %}<ul>
<li><p><code>cy.get()</code> can time out waiting for the element(s) to <a href="/guides/core-concepts/introduction-to-cypress.html#Default-Assertions">exist in the DOM</a>.</p></li>
</ul>Typically used inside the Timeouts section when documenting a command.
## Timeouts {% helper_icon timeout %}
{% timeouts existence cy.get %}The following timeouts are supported:
assertionsactionsexistenceautomationitsexectasknonepagerequestwaitpromisestimeouts
Generate a link.
{% url `.and()` and %}
{% url `.should()` should#Notes %}
{% url 'Read about why' why-cypress %}
{% url http://foo.com %}Generate a link to an anchor.
{% urlHash 'Standard Output' Standard-Output %}<a href="#Standard-Output">Standard Output</a>Describe the usage of a command option.
Typically used when documenting the options object inside the Arguments section.
## Arguments
**{% fa fa-angle-right %} options** ***(Object)***
Pass in an options object to change the default behavior of `.blur`.
Option | Default | Description
--- | --- | ---
`log` | `true` | {% usage_options log %}
`timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout .blur %}The following usages are supported:
logforcemultipletimeout
Link to a GitHub profile.
Typically used to give attribution to someone who has contributed to Cypress.
Contributed by {% user brian-mann %}.Embed a video.
{% video vimeo 240554515 %}{% video youtube 5XQOK0v_YRE %}{% video local /img/snippets/selector-playground.mp4 %}Describe what a command yields.
{% yields sets_subject cy.readFile 'yields the contents of the file' %}<ul>
<li><p><code>cy.readFile()</code> yields the contents of the file</p></li>
</ul>Typically used inside the Yields section when documenting a command.
## Yields {% helper_icon yields %}
{% yields sets_subject cy.readFile 'yields the contents of the file' %}The following yields are supported:
same_subjectchanges_subjectmaybe_changes_subjectchanges_dom_subjectchanges_dom_subject_or_subjectssets_dom_subjectsets_subjectnullnull_aliasassertion_indeterminate