mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-20 22:21:23 -06:00
docs: Updated external urls to url tags + converted image tags to markdown
This commit is contained in:
@@ -131,11 +131,11 @@ cy.get('#scrollable-horizontal').scrollTo('right')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="529" alt="screen shot 2017-04-14 at 12 29 13 pm" src="https://cloud.githubusercontent.com/assets/1271364/25049157/50d68f18-210e-11e7-81f1-ed837075160d.png">
|
||||

|
||||
|
||||
When clicking on `scrollTo` within the command log, the console outputs the following:
|
||||
|
||||
<img width="788" alt="screen shot 2017-04-14 at 12 32 16 pm" src="https://cloud.githubusercontent.com/assets/1271364/25049182/6e07211a-210e-11e7-9419-b57f3e08a608.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ cy.get('button').trigger('mouseover') // yields 'button'
|
||||
**Drag and Drop**
|
||||
|
||||
{% note info %}
|
||||
[Check out our example recipe triggering mouse and drag events to test dragging and dropping](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/drag_n_drop_spec.js)
|
||||
{% url 'Check out our example recipe triggering mouse and drag events to test dragging and dropping' 'https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/drag_n_drop_spec.js' %}
|
||||
{% endnote %}
|
||||
|
||||
## Change Event
|
||||
@@ -162,11 +162,11 @@ cy.get('button').first().trigger('mouseover')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="364" alt="Command log output" src="https://cloud.githubusercontent.com/assets/1157043/23477277/749d347e-fe8b-11e6-9c31-6667f7ff65d8.png">
|
||||

|
||||
|
||||
When clicking on `trigger` within the command log, the console outputs the following:
|
||||
|
||||
<img width="630" alt="Console output" src="https://cloud.githubusercontent.com/assets/1157043/23477276/749aac54-fe8b-11e6-81b3-e7600cca0ba0.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -236,11 +236,11 @@ cy
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="530" alt="screen shot 2015-11-29 at 12 16 46 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458700/36d1e646-9693-11e5-8771-158230530fdc.png">
|
||||

|
||||
|
||||
When clicking on `assert` within the command log, the console outputs the following:
|
||||
|
||||
<img width="636" alt="screen shot 2015-11-29 at 12 17 03 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458702/3b6873be-9693-11e5-88f7-a928ebdac80c.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ cy
|
||||
|
||||
Aliases of routes display in the routes instrument panel:
|
||||
|
||||
<img width="567" alt="screen shot 2015-11-29 at 2 25 47 pm" src="https://cloud.githubusercontent.com/assets/1271364/11459470/22e31e54-96a5-11e5-8895-a6ff5f8bb973.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -85,11 +85,11 @@ cy.get('[name="comment"]').focus().type('Nice Product!').blur()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="524" alt="screen shot 2015-11-27 at 1 37 36 pm" src="https://cloud.githubusercontent.com/assets/1271364/11446921/58a14e34-950c-11e5-85ba-633b7ed5d7f1.png">
|
||||

|
||||
|
||||
When clicking on the `blur` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="525" alt="screen shot 2015-11-27 at 1 37 53 pm" src="https://cloud.githubusercontent.com/assets/1271364/11446923/5c44a2ca-950c-11e5-8080-0dc108bc4959.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -122,11 +122,11 @@ cy.get('form').find('[name="emailUser"]').check()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="582" alt="screen shot 2015-11-29 at 12 53 25 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458925/6226b39e-9698-11e5-9a2a-debf91f5989a.png">
|
||||

|
||||
|
||||
When clicking on `check` within the command log, the console outputs the following:
|
||||
|
||||
<img width="547" alt="screen shot 2015-11-29 at 12 53 48 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458927/65a2526c-9698-11e5-8b33-f59e666170e2.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -117,11 +117,11 @@ cy.get('.left-nav>.nav').children().should('have.length', 8)
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="521" alt="screen shot 2015-11-27 at 1 52 26 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447069/2b0f8a7e-950e-11e5-96b5-9d82d9fdddec.png">
|
||||

|
||||
|
||||
When clicking on the `children` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="542" alt="screen shot 2015-11-27 at 1 52 41 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447071/2e9252bc-950e-11e5-9a32-e5860da89160.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -79,11 +79,11 @@ cy.get('input[name="name"]').clear().type('Jane Lane')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="570" alt="screen shot 2015-11-29 at 12 56 58 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458939/bac1f4dc-9698-11e5-8e20-1ed9405f3d30.png">
|
||||

|
||||
|
||||
When clicking on `clear` within the command log, the console outputs the following:
|
||||
|
||||
<img width="511" alt="screen shot 2015-11-29 at 12 57 07 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458940/bdc93a50-9698-11e5-8be7-ef6a0470c3ae.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -76,11 +76,11 @@ cy.clearLocalStorage(/prop1|2/).then(function(ls){
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="466" alt="screen shot 2017-05-24 at 3 19 15 pm" src="https://cloud.githubusercontent.com/assets/1271364/26421551/738be792-4094-11e7-9100-14937a369c7c.png">
|
||||

|
||||
|
||||
When clicking on `clearLocalStorage` within the command log, the console outputs the following:
|
||||
|
||||
<img width="564" alt="screen shot 2017-05-24 at 3 19 25 pm" src="https://cloud.githubusercontent.com/assets/1271364/26421552/73b17ac0-4094-11e7-8a13-b59bc9613613.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ cy.get('button').click(5, 60, { force: true })
|
||||
**Hover and clicking hidden elements**
|
||||
|
||||
{% note info %}
|
||||
[Check out our example recipe on testing hover and working with hidden elements.](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/hover_hidden_elements_spec.js)
|
||||
{% url 'Check out our example recipe on testing hover and working with hidden elements.' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/hover_hidden_elements_spec.js %}
|
||||
{% endnote %}
|
||||
|
||||
**Click all buttons found on the page**
|
||||
@@ -152,9 +152,9 @@ cy.get('button').click()
|
||||
|
||||
The events are fired to spec, including the coordinates of where the event took place.
|
||||
|
||||
At the moment, `mouseover` and `mouseout` events are *not* fired. [Open an issue](https://github.com/cypress-io/cypress/issues/new) if you need this to be fixed.
|
||||
At the moment, `mouseover` and `mouseout` events are *not* fired. {% url 'Open an issue' https://github.com/cypress-io/cypress/issues/new %} if you need this to be fixed.
|
||||
|
||||
Additionally if the `mousedown` event causes the element to be removed from the DOM, the remaining events should continue to be fired, but to the resulting element left below the removed element. This has also not been implemented. [Open an issue](https://github.com/cypress-io/cypress/issues/new) if you need this to be fixed.
|
||||
Additionally if the `mousedown` event causes the element to be removed from the DOM, the remaining events should continue to be fired, but to the resulting element left below the removed element. This has also not been implemented. {% url 'Open an issue' https://github.com/cypress-io/cypress/issues/new %} if you need this to be fixed.
|
||||
|
||||
**Focus is given to the first focusable element**
|
||||
|
||||
@@ -172,11 +172,11 @@ The coordinates of the click will be recorded the exact moment the click happens
|
||||
|
||||
**pointer-events: none**
|
||||
|
||||
Cypress does not currently factor in `pointer-events: none` in its clicking algorithm. [Open an issue](https://github.com/cypress-io/cypress/issues/new) if you need this to be fixed.
|
||||
Cypress does not currently factor in `pointer-events: none` in its clicking algorithm. {% url 'Open an issue' https://github.com/cypress-io/cypress/issues/new %} if you need this to be fixed.
|
||||
|
||||
**Element removal during `mousedown` or `mouseup`**
|
||||
|
||||
The spec states what should happen if the element clicked is removed from the DOM during `mousedown` or `mouseup`, but Cypress is not currently factoring this in. [Open an issue](https://github.com/cypress-io/cypress/issues/new) if you need this to be fixed.
|
||||
The spec states what should happen if the element clicked is removed from the DOM during `mousedown` or `mouseup`, but Cypress is not currently factoring this in. {% url 'Open an issue' https://github.com/cypress-io/cypress/issues/new %} if you need this to be fixed.
|
||||
|
||||
**Animations**
|
||||
|
||||
@@ -198,11 +198,11 @@ cy.get('form').find('button').contains('Create User').click()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="590" alt="screen shot 2015-11-29 at 1 07 27 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458988/3cd5bae8-969a-11e5-9938-40a553402992.png">
|
||||

|
||||
|
||||
When clicking on `click` within the command log, the console outputs the following:
|
||||
|
||||
<img width="759" alt="screen shot 2015-11-29 at 1 07 49 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458989/4036493c-969a-11e5-8f98-377dfce1f2c1.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ cy.clock(null, ['setTimeout', 'clearTimeout'])
|
||||
**Using cy.clock() and cy.tick()**
|
||||
|
||||
{% note info %}
|
||||
[Check out our example recipe testing spying, stubbing and time.](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/spy_stub_clock_spec.js)
|
||||
{% url 'Check out our example recipe testing spying, stubbing and time.' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/spy_stub_clock_spec.js%}
|
||||
{% endnote %}
|
||||
|
||||
# Notes
|
||||
@@ -196,16 +196,16 @@ cy.tick(1000)
|
||||
|
||||
The command above will display in the command log as:
|
||||
|
||||
<img width="448" alt="screen shot of command log" src="https://cloud.githubusercontent.com/assets/1157043/22437918/059f60a6-e6f8-11e6-903d-d868e044615d.png">
|
||||

|
||||
|
||||
When clicking on the `clock` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="1059" alt="screen shot of console output" src="https://cloud.githubusercontent.com/assets/1157043/22437920/0786f9d8-e6f8-11e6-9e77-926b15aa8dae.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
- {% url 'Guide: Stubs, Spies and Clocks' stubs-spies-clocks %}
|
||||
- {% url `cy.spy()` spy %}
|
||||
- {% url `cy.stub()` stub %}
|
||||
- [Recipe: Controlling Behavior with Spies, Stubs, and Clocks](https://github.com/cypress-io/cypress-example-recipes#controlling-behavior-with-spies-stubs-and-clocks)
|
||||
- {% url 'Recipe: Controlling Behavior with Spies, Stubs, and Clocks' https://github.com/cypress-io/cypress-example-recipes %}
|
||||
- {% url `cy.tick()` tick %}
|
||||
|
||||
@@ -72,11 +72,11 @@ cy.get('li.active').closest('.nav')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="530" alt="screen shot 2015-11-27 at 2 07 28 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447200/500fe9ca-9510-11e5-8c77-8afb8325d937.png">
|
||||

|
||||
|
||||
When clicking on the `closest` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="478" alt="screen shot 2015-11-27 at 2 07 46 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447201/535515c4-9510-11e5-9cf5-088bf21f34ac.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -318,11 +318,11 @@ cy.get('h1').contains('New User')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="536" alt="screen shot 2015-11-27 at 1 43 22 pm" src="https://cloud.githubusercontent.com/assets/1271364/11446973/009ac32c-950d-11e5-9eaa-09f8b8ddf086.png">
|
||||

|
||||
|
||||
When clicking on the `contains` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="477" alt="screen shot 2015-11-27 at 1 43 50 pm" src="https://cloud.githubusercontent.com/assets/1271364/11446977/04b31be4-950d-11e5-811e-4fd83d364d00.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -69,11 +69,11 @@ cy.get('[data-schedule-id="4529114"]:first').dblclick()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="585" alt="screen shot 2015-11-29 at 1 12 02 pm" src="https://cloud.githubusercontent.com/assets/1271364/11459013/035a6c5e-969b-11e5-935f-dce5c8efbdd6.png">
|
||||

|
||||
|
||||
When clicking on `dblclick` within the command log, the console outputs the following:
|
||||
|
||||
<img width="836" alt="screen shot 2015-11-29 at 1 12 26 pm" src="https://cloud.githubusercontent.com/assets/1271364/11459015/0755e216-969b-11e5-9f7e-ed04245d75ef.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -63,11 +63,11 @@ cy.get(".ls-btn").click({ force: true }).debug()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="466" alt="screen shot 2017-05-24 at 4 10 23 pm" src="https://cloud.githubusercontent.com/assets/1271364/26423391/896b858e-409b-11e7-91ce-14c5bf38ab11.png">
|
||||

|
||||
|
||||
When clicking on the `debug` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="572" alt="screen shot 2017-05-24 at 4 10 08 pm" src="https://cloud.githubusercontent.com/assets/1271364/26423392/89725486-409b-11e7-94d5-aebdffe16abf.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -68,11 +68,11 @@ cy.document()
|
||||
|
||||
The command above will display in the command log as:
|
||||
|
||||
<img width="588" alt="screen shot 2015-11-29 at 2 00 09 pm" src="https://cloud.githubusercontent.com/assets/1271364/11459311/aab8fe88-96a1-11e5-9b72-b0501204030d.png">
|
||||

|
||||
|
||||
When clicking on `document` within the command log, the console outputs the following:
|
||||
|
||||
<img width="491" alt="screen shot 2015-11-29 at 2 00 22 pm" src="https://cloud.githubusercontent.com/assets/1271364/11459314/ad27d7e8-96a1-11e5-8d1c-9c4ede6c54aa.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -107,11 +107,11 @@ cy.get('.left-nav.nav').find('>li').eq(3)
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="532" alt="screen shot 2015-11-27 at 2 11 47 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447231/e225e1f2-9510-11e5-8615-4a5b42ef71c1.png">
|
||||

|
||||
|
||||
When clicking on the `eq` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="569" alt="screen shot 2015-11-27 at 2 12 03 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447234/e594ce52-9510-11e5-8794-712a7dbeae55.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -150,11 +150,11 @@ cy.exec('cat cypress.json')
|
||||
|
||||
The command above will display in the command log as:
|
||||
|
||||
<img width="445" alt="screen shot of command log" src="https://cloud.githubusercontent.com/assets/1157043/15369507/e03a7eca-1d00-11e6-8558-396d8c9b6d98.png">
|
||||

|
||||
|
||||
When clicking on the `exec` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="758" alt="screen shot of console output" src="https://cloud.githubusercontent.com/assets/1157043/15969867/e3ab646e-2eff-11e6-9199-987ca2f74025.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -87,11 +87,11 @@ cy.get('.left-nav>.nav').find('>li').filter('.active')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="522" alt="screen shot 2015-11-27 at 2 15 53 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447263/7176e824-9511-11e5-93cc-fa10b3b94482.png">
|
||||

|
||||
|
||||
When clicking on the `filter` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="503" alt="screen shot 2015-11-27 at 2 16 09 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447266/74b643a4-9511-11e5-8b42-6f6dfbdfb2a8.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -80,11 +80,11 @@ cy.get('.left-nav>.nav').find('>li')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="522" alt="screen shot 2015-11-27 at 2 19 38 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447309/f6a9be4a-9511-11e5-84a5-a111215bf1e6.png">
|
||||

|
||||
|
||||
When clicking on the `find` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="516" alt="screen shot 2015-11-27 at 2 19 54 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447312/fa3679cc-9511-11e5-9bea-904f8c70063d.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -78,11 +78,11 @@ cy.get('form').find('input').first()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="527" alt="screen shot 2015-11-29 at 12 28 08 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458770/d9439ee6-9694-11e5-8754-b2641ba44883.png">
|
||||

|
||||
|
||||
When clicking on `first` within the command log, the console outputs the following:
|
||||
|
||||
<img width="616" alt="screen shot 2015-11-29 at 12 28 23 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458771/db8cb516-9694-11e5-86c2-cf3bbb9a666d.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ cy
|
||||
**Using fixtures to bootstrap data**
|
||||
|
||||
{% note info %}
|
||||
[Check out our example recipe using cy.fixture to bootstrap data for our application.](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/bootstrapping_app_test_data_spec.js)
|
||||
{% url 'Check out our example recipe using cy.fixture to bootstrap data for our application.' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/bootstrapping_app_test_data_spec.js %}
|
||||
{% endnote %}
|
||||
|
||||
**Using an alias to access a fixture**
|
||||
@@ -222,6 +222,6 @@ For other types of files, they will be read as `utf8` by default, unless specifi
|
||||
# See also
|
||||
|
||||
- {% url `cy.readFile()` readfile %}
|
||||
- [Recipe: Bootstrapping App Test Data](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/bootstrapping_app_test_data_spec.js)
|
||||
- {% url 'Recipe: Bootstrapping App Test Data' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/bootstrapping_app_test_data_spec.js%}
|
||||
- {% url `cy.route()` route %}
|
||||
- {% url `.then()` then %}
|
||||
|
||||
@@ -72,7 +72,7 @@ If there is currently a different DOM element with focus, Cypress issues a `blur
|
||||
|
||||
**Can only be called on a valid focusable element.**
|
||||
|
||||
Ensure the element you are trying to call `.focus()` on is a [focusable element](https://www.w3.org/TR/html5/editing.html#focusable). Most commonly, you'll want to ensure that the element is not disabled, although there are [other factors](https://www.w3.org/TR/html5/editing.html#focusable).
|
||||
Ensure the element you are trying to call `.focus()` on is a {% url 'focusable element' https://www.w3.org/TR/html5/editing.html#focusable%}. Most commonly, you'll want to ensure that the element is not disabled, although there are {% url 'other factors' https://www.w3.org/TR/html5/editing.html#focusable%}.
|
||||
|
||||
**Can time out because your browser did not receive any focus events.**
|
||||
|
||||
@@ -88,11 +88,11 @@ cy.get('[name="comment"]').focus()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="524" alt="screen shot 2015-11-27 at 1 32 37 pm" src="https://cloud.githubusercontent.com/assets/1271364/11446856/6c2c36f4-950b-11e5-89c6-9bf14a448b23.png">
|
||||

|
||||
|
||||
When clicking on the `focus` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="526" alt="screen shot 2015-11-27 at 1 33 00 pm" src="https://cloud.githubusercontent.com/assets/1271364/11446857/703fa6c2-950b-11e5-9686-ce6b558cfd92.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -74,11 +74,11 @@ cy.focused().should('have.attr', 'name').and('eq', 'num')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="523" alt="screen shot 2015-11-27 at 1 01 51 pm" src="https://cloud.githubusercontent.com/assets/1271364/11446780/f71fb350-9509-11e5-963a-a6940fbc63b6.png">
|
||||

|
||||
|
||||
When clicking on the `focused` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="407" alt="screen shot 2015-11-27 at 1 02 02 pm" src="https://cloud.githubusercontent.com/assets/1271364/11446771/d104a6d0-9509-11e5-9464-2e397cb1eb24.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -129,11 +129,11 @@ cy.get('input[name="firstName"]').should('have.value', 'Homer')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="524" alt="screen shot 2015-11-27 at 1 24 20 pm" src="https://cloud.githubusercontent.com/assets/1271364/11446808/5d2f2180-950a-11e5-8645-4f0f14321f86.png">
|
||||

|
||||
|
||||
When clicking on the `get` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="543" alt="screen shot 2015-11-27 at 1 24 45 pm" src="https://cloud.githubusercontent.com/assets/1271364/11446809/61a6f4f4-950a-11e5-9b23-a9efa1fbccfc.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ cy.getCookie('session_id')
|
||||
**Using `cy.getCookie()` to test logging in**
|
||||
|
||||
{% note info %}
|
||||
Check out our example recipes using `cy.getCookie()` to test [logging in using HTML web forms](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_html_web_form_spec.js), [logging in using XHR web forms](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js) and [logging in with single sign on](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_single_sign_on_spec.js)
|
||||
Check out our example recipes using `cy.getCookie()` to test {% url 'logging in using HTML web forms' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_html_web_form_spec.js %}, {% url 'logging in using XHR web forms' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js %} and {% url 'logging in with single sign on' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_single_sign_on_spec.js %}
|
||||
{% endnote %}
|
||||
|
||||
# Command Log
|
||||
|
||||
@@ -80,11 +80,11 @@ cy.hash().should('eq', '#users/new')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="581" alt="screen shot 2015-11-29 at 1 34 12 pm" src="https://cloud.githubusercontent.com/assets/1271364/11459152/ed737be4-969d-11e5-823e-1d12cd7d03b1.png">
|
||||

|
||||
|
||||
When clicking on `hash` within the command log, the console outputs the following:
|
||||
|
||||
<img width="472" alt="screen shot 2015-11-29 at 1 34 17 pm" src="https://cloud.githubusercontent.com/assets/1271364/11459153/f0aa6476-969d-11e5-9851-302957f9eb0f.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ cy.get('.content').invoke('show').click()
|
||||
```
|
||||
|
||||
{% note info %}
|
||||
[Check out our example recipe on testing hover and working with hidden elements](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/hover_hidden_elements_spec.js)
|
||||
{% url 'Check out our example recipe on testing hover and working with hidden elements' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/hover_hidden_elements_spec.js %}
|
||||
{% endnote %}
|
||||
|
||||
You can also force the action to be performed on the element regardless of whether the element is visible or not.
|
||||
@@ -52,5 +52,5 @@ cy.get('.content').trigger('mouseover')
|
||||
# See also
|
||||
|
||||
- {% url `.invoke()` invoke %}
|
||||
- [Recipe: Dealing with Hover and Hidden Elements](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/hover_hidden_elements_spec.js)
|
||||
- {% url 'Recipe: Dealing with Hover and Hidden Elements' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/hover_hidden_elements_spec.js %}
|
||||
- {% url `cy.wrap()` wrap %}
|
||||
|
||||
@@ -152,11 +152,11 @@ cy.get('.connectors-div').should('be.hidden')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="470" alt="screen shot 2017-06-01 at 1 13 44 pm" src="https://cloud.githubusercontent.com/assets/1271364/26691729/3a75b3c8-46cc-11e7-835d-68200388ddf2.png">
|
||||

|
||||
|
||||
When clicking on `invoke` within the command log, the console outputs the following:
|
||||
|
||||
<img width="534" alt="screen shot 2017-06-01 at 1 14 00 pm" src="https://cloud.githubusercontent.com/assets/1271364/26691730/3a9baeca-46cc-11e7-8519-9e4a04490601.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ cy
|
||||
**Use `.its()` to test `window.fetch`**
|
||||
|
||||
{% note info %}
|
||||
[Check out our example recipe on testing `window.fetch` using `.its()`](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/spy_stub_clock_spec.js)
|
||||
{% url 'Check out our example recipe on testing `window.fetch` using `.its()`' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/spy_stub_clock_spec.js %}
|
||||
{% endnote %}
|
||||
|
||||
## Nested Properties
|
||||
|
||||
@@ -78,11 +78,11 @@ cy.get('form').find('button').last()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="560" alt="screen shot 2015-11-29 at 12 33 52 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458797/8e9abdf6-9695-11e5-8594-7044751d5199.png">
|
||||

|
||||
|
||||
When clicking on `last` within the command log, the console outputs the following:
|
||||
|
||||
<img width="746" alt="screen shot 2015-11-29 at 12 34 07 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458799/91a115cc-9695-11e5-8569-93fbaa2704d4.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ cy.window().then(function(window){
|
||||
})
|
||||
```
|
||||
|
||||
<img width="422" alt="screen shot 2017-05-26 at 11 41 27 am" src="https://cloud.githubusercontent.com/assets/1271364/26501744/6f9b6188-4208-11e7-91ce-59dbb455b1fc.png">
|
||||

|
||||
|
||||
***Console output of `.location()`***
|
||||
|
||||
@@ -125,7 +125,7 @@ cy.location().then(function(location){
|
||||
})
|
||||
```
|
||||
|
||||
<img width="478" alt="screen shot 2017-05-26 at 11 42 11 am" src="https://cloud.githubusercontent.com/assets/1271364/26501743/6f8fcb84-4208-11e7-9f08-9c97592afc08.png">
|
||||

|
||||
|
||||
# Command Log
|
||||
|
||||
|
||||
@@ -69,11 +69,11 @@ cy.log('another message', ['one', 'two', 'three'])
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="560" alt="command log with cy.log" src="https://cloud.githubusercontent.com/assets/1271364/21321329/55389b3c-c5e2-11e6-8607-592683d520da.png">
|
||||

|
||||
|
||||
When clicking on `log` within the command log, the console outputs the following:
|
||||
|
||||
<img width="746" alt="console display of cy.log" src="https://cloud.githubusercontent.com/assets/1271364/21321324/4f616dec-c5e2-11e6-8c2f-924e7bfd6f87.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -101,11 +101,11 @@ cy.get('.left-nav').find('li.active').next()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="563" alt="screen shot 2015-11-29 at 12 42 07 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458857/afcfddf2-9696-11e5-9405-0cd994f70d45.png">
|
||||

|
||||
|
||||
When clicking on `next` within the command log, the console outputs the following:
|
||||
|
||||
<img width="547" alt="screen shot 2015-11-29 at 12 42 22 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458858/b30b0a0a-9696-11e5-99b9-d785b597287c.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -104,11 +104,11 @@ cy.get('.left-nav').find('li.active').nextAll()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="560" alt="screen shot 2017-03-23 at 2 05 32 pm" src="https://cloud.githubusercontent.com/assets/1271364/24262886/e1513334-0fd1-11e7-93b1-b413a9390828.png">
|
||||

|
||||
|
||||
When clicking on `nextAll` within the command log, the console outputs the following:
|
||||
|
||||
<img width="567" alt="screen shot 2017-03-23 at 2 05 52 pm" src="https://cloud.githubusercontent.com/assets/1271364/24262907/f2b7fe78-0fd1-11e7-921c-6eabf6e32abb.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -103,11 +103,11 @@ cy.get('#veggies').nextUntil('#nuts')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="563" alt="screen shot 2017-03-23 at 2 17 52 pm" src="https://cloud.githubusercontent.com/assets/1271364/24263453/96a8c0b6-0fd3-11e7-8a66-da9177ca94a7.png">
|
||||

|
||||
|
||||
When clicking on `nextUntil` within the command log, the console outputs the following:
|
||||
|
||||
<img width="514" alt="screen shot 2017-03-23 at 2 18 01 pm" src="https://cloud.githubusercontent.com/assets/1271364/24263481/a20ce2f2-0fd3-11e7-881c-f6bf8d652263.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -76,11 +76,11 @@ cy.get('form').find('button').not('[type="submit"]')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="572" alt="screen shot 2015-11-29 at 12 36 49 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458817/0a846c3c-9696-11e5-9901-5f4376629e75.png">
|
||||

|
||||
|
||||
When clicking on `not` within the command log, the console outputs the following:
|
||||
|
||||
<img width="689" alt="screen shot 2015-11-29 at 12 37 39 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458819/0d6870f6-9696-11e5-9364-2685b8ffc71b.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -82,11 +82,11 @@ cy.get('li.active').parent().should('have.class', 'nav')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="531" alt="screen shot 2015-11-27 at 1 58 32 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447127/0d9ab5a8-950f-11e5-90ae-c317dd83aa65.png">
|
||||

|
||||
|
||||
When clicking on the `parent` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="440" alt="screen shot 2015-11-27 at 1 58 44 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447130/11b22c02-950f-11e5-9b82-cc3b2ff8548e.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -81,11 +81,11 @@ cy.get('li.active').parents('.nav')
|
||||
cy.get('li.active').parents()
|
||||
```
|
||||
|
||||
<img width="531" alt="screen shot 2015-11-27 at 2 02 59 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447168/be286244-950f-11e5-82e8-9a2a6d1d08e8.png">
|
||||

|
||||
|
||||
When clicking on the `parents` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="537" alt="screen shot 2015-11-27 at 2 03 32 pm" src="https://cloud.githubusercontent.com/assets/1271364/11447171/c1ba5ef8-950f-11e5-9f2d-7fbd0b142649.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -101,11 +101,11 @@ cy.get('.active').parentsUntil('.nav')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="561" alt="screen shot 2017-03-23 at 2 37 31 pm" src="https://cloud.githubusercontent.com/assets/1271364/24264301/516d5fd6-0fd6-11e7-9ab7-b55b211acde3.png">
|
||||

|
||||
|
||||
When clicking on `parentsUntil` within the command log, the console outputs the following:
|
||||
|
||||
<img width="523" alt="screen shot 2017-03-23 at 2 37 39 pm" src="https://cloud.githubusercontent.com/assets/1271364/24264309/60cc75de-0fd6-11e7-97b4-d0aa184b0ba6.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -72,33 +72,33 @@ cy.get('#action-canvas')
|
||||
|
||||
The commands above will display in the GUI as:
|
||||
|
||||
<img width="985" alt="screen shot 2017-05-26 at 2 18 10 pm" src="https://cloud.githubusercontent.com/assets/1271364/26507426/4d48a5e4-421e-11e7-9bd4-c6829f80910d.png">
|
||||

|
||||
|
||||
When clicking on "Next: 'click'" at the top of the Command Log, the Command Log will run only the next command and pause again.
|
||||
|
||||
***Click "Next"***
|
||||
|
||||
<img width="985" alt="screen shot 2017-05-26 at 2 18 15 pm" src="https://cloud.githubusercontent.com/assets/1271364/26507427/4d49e33c-421e-11e7-9bea-26b89ec6fe32.png">
|
||||

|
||||
|
||||
***Click "Next" again***
|
||||
|
||||
<img width="985" alt="screen shot 2017-05-26 at 2 18 24 pm" src="https://cloud.githubusercontent.com/assets/1271364/26507424/4d446204-421e-11e7-82a1-a5ce8b4bb4a9.png">
|
||||

|
||||
|
||||
***Click "Next" again***
|
||||
|
||||
<img width="985" alt="screen shot 2017-05-26 at 2 18 29 pm" src="https://cloud.githubusercontent.com/assets/1271364/26507421/4d3a69e8-421e-11e7-9a26-1026d0d133ec.png">
|
||||

|
||||
|
||||
***Click "Next" again***
|
||||
|
||||
<img width="985" alt="screen shot 2017-05-26 at 2 18 33 pm" src="https://cloud.githubusercontent.com/assets/1271364/26507422/4d3b30a8-421e-11e7-940d-bd7bdc7b6e81.png">
|
||||

|
||||
|
||||
***Click "Next" again***
|
||||
|
||||
<img width="985" alt="screen shot 2017-05-26 at 2 18 36 pm" src="https://cloud.githubusercontent.com/assets/1271364/26507420/4d37dcc8-421e-11e7-8428-8529ad628b05.png">
|
||||

|
||||
|
||||
***Click "Next" again, then 'Resume'***
|
||||
|
||||
<img width="985" alt="screen shot 2017-05-26 at 2 18 51 pm" src="https://cloud.githubusercontent.com/assets/1271364/26507423/4d3c5992-421e-11e7-8df8-9af67f5ceb4a.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -104,11 +104,11 @@ cy.get('.left-nav').find('li.active').prev()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="564" alt="screen shot 2015-11-29 at 12 46 57 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458884/5bb4da1e-9697-11e5-9172-762df10c9a6e.png">
|
||||

|
||||
|
||||
When clicking on `prev` within the command log, the console outputs the following:
|
||||
|
||||
<img width="446" alt="screen shot 2015-11-29 at 12 47 09 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458886/5e20c63c-9697-11e5-9167-1b81f96e1906.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -104,11 +104,11 @@ cy.get('.left-nav').find('li.active').prevAll()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="562" alt="screen shot 2017-03-23 at 2 50 20 pm" src="https://cloud.githubusercontent.com/assets/1271364/24264885/1a1d87ac-0fd8-11e7-97cb-1d0d2110de81.png">
|
||||

|
||||
|
||||
When clicking on `prevAll` within the command log, the console outputs the following:
|
||||
|
||||
<img width="539" alt="screen shot 2017-03-23 at 2 50 26 pm" src="https://cloud.githubusercontent.com/assets/1271364/24264898/2219d1a4-0fd8-11e7-9e8b-6b2d97166d6a.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -102,11 +102,11 @@ cy.get('#nuts').prevUntil('#veggies')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="560" alt="screen shot 2017-03-23 at 2 45 30 pm" src="https://cloud.githubusercontent.com/assets/1271364/24264621/69ed829c-0fd7-11e7-934d-c11157c36aca.png">
|
||||

|
||||
|
||||
When clicking on `prevUntil` within the command log, the console outputs the following:
|
||||
|
||||
<img width="560" alt="screen shot 2017-03-23 at 2 45 36 pm" src="https://cloud.githubusercontent.com/assets/1271364/24264632/7743f57a-0fd7-11e7-99f8-c148acd17459.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -162,11 +162,11 @@ cy.readFile('cypress.json')
|
||||
|
||||
The command above will display in the command log as:
|
||||
|
||||
<img width="521" alt="screen shot of command log" src="https://cloud.githubusercontent.com/assets/1157043/17934353/a02d6c34-69e5-11e6-8f1d-ab1eda17ab3b.png">
|
||||

|
||||
|
||||
When clicking on the `readFile` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="689" alt="screen shot of console output" src="https://cloud.githubusercontent.com/assets/1157043/17934460/089e0652-69e6-11e6-9f00-7eb282be0d27.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ cy.getCookie('cypress-session-cookie').should('exist')
|
||||
**Using cy.request for HTML Forms**
|
||||
|
||||
{% note info %}
|
||||
[Check out our example recipe using cy.request for HTML form submissions](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_html_web_form_spec.js)
|
||||
{% url 'Check out our example recipe using `cy.request` for HTML form submissions' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_html_web_form_spec.js %}
|
||||
{% endnote %}
|
||||
|
||||
# Notes
|
||||
@@ -212,8 +212,8 @@ In other words, `cy.request()` transparently performs all of the underlying func
|
||||
# See also
|
||||
|
||||
- {% url `cy.exec()` exec %}
|
||||
- [Recipe: Logging In - CSRF Tokens](https://github.com/cypress-io/cypress-example-recipes#logging-in---csrf-tokens)
|
||||
- [Recipe: Logging In - HTML Web Form](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_html_web_form_spec.js)
|
||||
- [Recipe: Logging In - Single Sign on](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_single_sign_on_spec.js)
|
||||
- [Recipe: Logging In - XHR Web Form](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js)
|
||||
- {% url 'Recipe: Logging In - CSRF Tokens' https://github.com/cypress-io/cypress-example-recipes %}
|
||||
- {% url 'Recipe: Logging In - HTML Web Form' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_html_web_form_spec.js %}
|
||||
- {% url 'Recipe: Logging In - Single Sign on' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_single_sign_on_spec.js %}
|
||||
- {% url 'Recipe: Logging In - XHR Web Form' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js %}
|
||||
- {% url `cy.visit()` visit %}
|
||||
|
||||
@@ -82,11 +82,11 @@ cy.get('.query-ul').within(function(){
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="471" alt="screen shot 2017-06-05 at 12 37 56 pm" src="https://cloud.githubusercontent.com/assets/1271364/26793399/ddafd970-49eb-11e7-9267-c35b583bb76f.png">
|
||||

|
||||
|
||||
When clicking on the `root` command within the command log, the console outputs the following:
|
||||
|
||||
<img width="394" alt="screen shot 2017-06-05 at 12 38 02 pm" src="https://cloud.githubusercontent.com/assets/1271364/26793398/dda22da2-49eb-11e7-98e8-5cd381aac175.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -99,12 +99,12 @@ cy.wait('@postUser')
|
||||
**Setup route to `POST` to login**
|
||||
|
||||
{% note info %}
|
||||
[Check out our example recipe using `cy.route()` to POST for login](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js)
|
||||
{% url 'Check out our example recipe using `cy.route()` to POST for login' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js %}
|
||||
{% endnote %}
|
||||
|
||||
**Wait on `url` matching glob**
|
||||
|
||||
Under the hood Cypress uses [minimatch](https://github.com/isaacs/minimatch) to match glob patterns of `url`.
|
||||
Under the hood Cypress uses {% url 'minimatch' https://github.com/isaacs/minimatch %} to match glob patterns of `url`.
|
||||
|
||||
This means you can take advantage of `*` and `**` glob support. This makes it *much* easier to route against dynamic segments without having to build up a complex `RegExp`.
|
||||
|
||||
@@ -133,7 +133,7 @@ cy.route('/posts/**')
|
||||
|
||||
**Override `url` glob matching options**
|
||||
|
||||
When we check `glob` patterns with [minimatch](https://github.com/isaacs/minimatch), by default Cypress uses sets `matchBase` to `true`. You can override this option in {% url `cy.server()` server %} options.
|
||||
When we check `glob` patterns with {% url 'minimatch' https://github.com/isaacs/minimatch %}, by default Cypress uses sets `matchBase` to `true`. You can override this option in {% url `cy.server()` server %} options.
|
||||
|
||||
If you want to permanently override these options you could do so by setting {% url `Cypress.Server.defaults()` cypress-server %}.
|
||||
|
||||
@@ -194,7 +194,7 @@ cy.route('POST', '/comments/**', commentsResponse)
|
||||
|
||||
Any request that matches the `method` and `url` of a route will be responded to based on the configuration of that route.
|
||||
|
||||
If a request doesn't match any route, [it will automatically receive a 404](#notes). For example, given we have the following routes:
|
||||
If a request doesn't match any route, [it will automatically receive a 404](#Notes). For example, given we have the following routes:
|
||||
|
||||
```javascript
|
||||
cy.server()
|
||||
@@ -315,7 +315,7 @@ cy.route({
|
||||
**Setup route to error on POST to login**
|
||||
|
||||
{% note info %}
|
||||
[Check out our example recipe using cy.route to simulate a 503 on POST to login](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js)
|
||||
{% url 'Check out our example recipe using `cy.route()` to simulate a 503 on POST to login' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js %}
|
||||
{% endnote %}
|
||||
|
||||
**Change `headers`**
|
||||
@@ -462,6 +462,6 @@ When clicking on `XHR Stub` within the Command Log, the console outputs the foll
|
||||
- {% url `.as()` as %}
|
||||
- {% url `cy.fixture()` fixture %}
|
||||
- {% url 'Network Requests' network-requests %}
|
||||
- [Recipe: Logging in - XHR Web Form](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js)
|
||||
- {% url 'Recipe: Logging in - XHR Web Form' https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js %}
|
||||
- {% url `cy.server()` server %}
|
||||
- {% url `cy.wait()` wait %}
|
||||
|
||||
@@ -85,15 +85,15 @@ When running headlessly or in {% url 'Continuous Integration' continuous-integra
|
||||
|
||||
You can see screenshots taken during a CI run in the {% url 'Dashboard' https://on.cypress.io/dashboard %} without any extra work.
|
||||
|
||||
Alternatively, to see screenshots in the [Circle CI](https://circleci.com/) UI, we automatically export screenshots as artifacts. This makes them available directly in their web UI.
|
||||
Alternatively, to see screenshots in the {% url 'Circle CI' https://circleci.com/ %} UI, we automatically export screenshots as artifacts. This makes them available directly in their web UI.
|
||||
|
||||
If you're using Travis, you'll need to upload artifacts to an s3 bucket as per their [uploading artifacts doc](https://docs.travis-ci.com/user/uploading-artifacts/) to see screenshots outside of the Cypress Dashboard.
|
||||
If you're using Travis, you'll need to upload artifacts to an s3 bucket as per their {% url 'uploading artifacts doc' https://docs.travis-ci.com/user/uploading-artifacts/ %} to see screenshots outside of the Cypress Dashboard.
|
||||
|
||||
**Understanding when a screenshot happens**
|
||||
|
||||
Taking a screenshot is an asynchronous action that takes around `100ms` to complete. By the time the screenshot is taken, it's possible something in your application may have changed. It's important to realize that the screenshot may not reflect 100% of what your application looked like when the command was issued.
|
||||
|
||||
For example - say a command we wrote times outs: `cy.get('#element')`. This causes your test to fail. Cypress then takes a screenshot when the test fails, but it's possible something in your application changed within the `100ms` timeframe. Hypothetically your app could render the element you were searching for. When this happens the screenshot may provide confusing results. It's unlikely, but theoretically possible.
|
||||
For example - say a command we wrote times outs: {% url '`cy.get('#element')`' get %}. This causes your test to fail. Cypress then takes a screenshot when the test fails, but it's possible something in your application changed within the `100ms` timeframe. Hypothetically your app could render the element you were searching for. When this happens the screenshot may provide confusing results. It's unlikely, but theoretically possible.
|
||||
|
||||
# Command Log
|
||||
|
||||
@@ -105,11 +105,11 @@ cy.screenshot('my-image')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="559" alt="screen shot 2016-06-13 at 10 46 25 am" src="https://cloud.githubusercontent.com/assets/1271364/16012082/ded7af6c-3155-11e6-83cb-b0dcb6f850a7.png">
|
||||

|
||||
|
||||
When clicking on `screenshot` within the command log, the console outputs the following:
|
||||
|
||||
<img width="667" alt="screen shot 2016-06-13 at 10 46 15 am" src="https://cloud.githubusercontent.com/assets/1271364/16012081/ded22a2e-3155-11e6-8303-0f1ec64e209b.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -137,11 +137,11 @@ cy.get('select').select('Homer Simpson')
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="575" alt="screen shot 2015-11-29 at 1 17 27 pm" src="https://cloud.githubusercontent.com/assets/1271364/11459044/a2fd8fca-969b-11e5-8d23-3a118b82b5de.png">
|
||||

|
||||
|
||||
When clicking on `select` within the command log, the console outputs the following:
|
||||
|
||||
<img width="560" alt="screen shot 2015-11-29 at 1 17 45 pm" src="https://cloud.githubusercontent.com/assets/1271364/11459045/a6b3bde2-969b-11e5-9357-272ea9684987.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ Pass in an options object to change the default behavior of `cy.setCookie()`.
|
||||
Option | Default | Notes
|
||||
--- | --- | ---
|
||||
`domain` | `window.location.hostname` | The domain the cookie is visible to
|
||||
`expiry` | 20 years into the future | When the cookie expires, specified in seconds since [Unix Epoch](https://en.wikipedia.org/wiki/Unix_time).
|
||||
`expiry` | 20 years into the future | When the cookie expires, specified in seconds since {% url 'Unix Epoch' https://en.wikipedia.org/wiki/Unix_time %}.
|
||||
`httpOnly` | `false` | Whether the cookie is an HTTP only cookie
|
||||
`log` | `true` | Whether to display command in Command Log
|
||||
`path` | `/` | The cookie path
|
||||
|
||||
@@ -281,11 +281,11 @@ cy.get('.left-nav>.nav').children().should('have.length', 8)
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="525" alt="screen shot 2015-11-29 at 12 08 35 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458632/04e5da58-9692-11e5-870d-8f9e274192d1.png">
|
||||

|
||||
|
||||
When clicking on `assert` within the command log, the console outputs the following:
|
||||
|
||||
<img width="768" alt="screen shot 2015-11-29 at 12 08 45 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458633/08a7b238-9692-11e5-9d5d-620122436bc0.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -94,11 +94,11 @@ cy.get('.left-nav').find('li.active').siblings()
|
||||
|
||||
The commands above will display in the command log as:
|
||||
|
||||
<img width="561" alt="screen shot 2015-11-29 at 12 48 55 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458897/a93f2a1e-9697-11e5-8a5b-b131156e1aa4.png">
|
||||

|
||||
|
||||
When clicking on `siblings` within the command log, the console outputs the following:
|
||||
|
||||
<img width="429" alt="screen shot 2015-11-29 at 12 49 09 pm" src="https://cloud.githubusercontent.com/assets/1271364/11458898/ab940fd2-9697-11e5-96ab-a4c34efa3431.png">
|
||||

|
||||
|
||||
# See also
|
||||
|
||||
|
||||
@@ -274,11 +274,11 @@ cy.get('body').type('{shift}', {release: false}).get('li:first').click()
|
||||
|
||||
**Typing `tab` key does not work**
|
||||
|
||||
Tabbing will be implemented as a separate command as `cy.tab` and support things like multiple tabs, tabbing in reverse, or tabbing to a specific element. [Open an issue](https://github.com/cypress-io/cypress/issues/new) if you need this to be fixed.
|
||||
Tabbing will be implemented as a separate command as `cy.tab` and support things like multiple tabs, tabbing in reverse, or tabbing to a specific element. {% url 'Open an issue' https://github.com/cypress-io/cypress/issues/new %} if you need this to be fixed.
|
||||
|
||||
**Preventing `mousedown` does not prevent typing**
|
||||
|
||||
In a real browser, preventing `mousedown` on a form field will prevent it from receiving focus and thus prevent it from being able to be typed into. Currently, Cypress does not factor this in. [Open an issue](https://github.com/cypress-io/cypress/issues/new) if you need this to be fixed.
|
||||
In a real browser, preventing `mousedown` on a form field will prevent it from receiving focus and thus prevent it from being able to be typed into. Currently, Cypress does not factor this in. {% url 'Open an issue' https://github.com/cypress-io/cypress/issues/new %} if you need this to be fixed.
|
||||
|
||||
**Modifier effects**
|
||||
|
||||
@@ -300,7 +300,7 @@ In the example above, a lowercase `a` will be typed, because that's the literal
|
||||
|
||||
This holds true for other special key combinations as well (that may be OS-specific). For example, on OSX, typing `ALT + SHIFT + K` creates the special character ``. Like with capitalization, `cy.type()` will not output ``, but simply the letter `k`.
|
||||
|
||||
[Open an issue](https://github.com/cypress-io/cypress/issues/new) if you need modifier effects to be implemented.
|
||||
{% url 'Open an issue' https://github.com/cypress-io/cypress/issues/new %} if you need modifier effects to be implemented.
|
||||
|
||||
**Events that fire**
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ cy.viewport('iphone-6', 'landscape')
|
||||
|
||||
**`devicePixelRatio` is not simulated**
|
||||
|
||||
This is something Cypress will eventually do, which will match how Chrome's responsive mobile browsing simulation works. [Open an issue](https://github.com/cypress-io/cypress/issues/new) if you need this to be fixed.
|
||||
This is something Cypress will eventually do, which will match how Chrome's responsive mobile browsing simulation works. {% url 'Open an issue' https://github.com/cypress-io/cypress/issues/new %} if you need this to be fixed.
|
||||
|
||||
**Cypress will restore the viewport in the snapshot**
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ We are working on open sourcing Cypress. You can read more [here](https://www.cy
|
||||
|
||||
- Search existing [open issues](https://github.com/cypress-io/cypress/issues), it may already be reported!
|
||||
- Update Cypress. Your issue may have [already been fixed](https://github.com/cypress-io/cypress/wiki/changelog).
|
||||
- [Open an issue](https://github.com/cypress-io/cypress/issues/new). Your best chance of getting a bug looked at quickly is to provide a repository with a reproducible bug that can be cloned and run.
|
||||
- {% url 'Open an issue' https://github.com/cypress-io/cypress/issues/new %}. Your best chance of getting a bug looked at quickly is to provide a repository with a reproducible bug that can be cloned and run.
|
||||
|
||||
# Using Cypress
|
||||
|
||||
|
||||
@@ -474,7 +474,7 @@ comments: false
|
||||
**Bugfixes:**
|
||||
|
||||
- Fixed a regression in `0.17.1` that was incorrectly setting `Cache` headers. This *could* cause a situation where you received an `<iframe>` origin error. Additionally we now set `No-Cache` headers whenever we inject content, but otherwise respect the headers coming from web servers. When using Cypress as the file server, we set `etags` but prevent caching.
|
||||
- Most likely fixed a bug that was crashing Cypress due to `Cannot set headers after they've been sent`. We were unable to write a test for this since we could not recreate the error, but analyzed how it *may* happen and fixed the code there. [Open an issue](https://github.com/cypress-io/cypress/issues/new) if you see this error, it will be obvious since Cypress will literally crash.
|
||||
- Most likely fixed a bug that was crashing Cypress due to `Cannot set headers after they've been sent`. We were unable to write a test for this since we could not recreate the error, but analyzed how it *may* happen and fixed the code there. {% url 'Open an issue' https://github.com/cypress-io/cypress/issues/new %} if you see this error, it will be obvious since Cypress will literally crash.
|
||||
- We stopped minifying `vendor.js` (for real this time). More optimizations to come around this.
|
||||
- Prevented accidentally setting `domain` cookies when they were really `hostOnly` cookies, thus duplicating the number of cookies sent on requests. Kudos to [@bahmutov](https://github.com/bahmutov) for finding this one. Fixes [#207](https://github.com/cypress-io/cypress/issues/207).
|
||||
- Fixed some edge cases in `cypress-core-extension` where it threw errors when attempting to `executeScript` on a tab with `about:blank` or `chrome://` urls.
|
||||
|
||||
Reference in New Issue
Block a user