Began converting existing links to url tags

This commit is contained in:
Jennifer Shehane
2017-06-09 14:04:20 -04:00
parent 81e4cbf1b4
commit 70e7c04763
49 changed files with 94 additions and 92 deletions

View File

@@ -170,9 +170,9 @@ When clicking on `trigger` within the command log, the console outputs the follo
# See also
- [blur](https://on.cypress.io/api/blur)
- [check](https://on.cypress.io/api/check)
- [click](https://on.cypress.io/api/click)
- {% url `.blur()` blur %}
- {% url `.check()` check %}
- {% url `.click()` click %}
- [focus](https://on.cypress.io/api/focus)
- [select](https://on.cypress.io/api/select)
- [submit](https://on.cypress.io/api/submit)

View File

@@ -130,5 +130,5 @@ When clicking on `check` within the command log, the console outputs the followi
# See also
- [click](https://on.cypress.io/api/click)
- {% url `.click()` click %}
- [uncheck](https://on.cypress.io/api/uncheck)

View File

@@ -87,6 +87,6 @@ When clicking on `clear` within the command log, the console outputs the followi
# See also
- [blur](https://on.cypress.io/api/blur)
- {% url `.blur()` blur %}
- [focus](https://on.cypress.io/api/focus)
- [type](https://on.cypress.io/api/type)

View File

@@ -87,7 +87,8 @@ When clicking on `clearCookie` within the command log, the console outputs the f
# See also
- [clearCookies](https://on.cypress.io/api/clearcookies)
- {% url `cy.clearCookies()` clearcookies %}
- {% url `cy.clearLocalStorage()` clearlocalstorage %}
- [Cypress Cookies API](https://on.cypress.io/api/cookies)
- [getCookie](https://on.cypress.io/api/getcookie)
- [getCookies](https://on.cypress.io/api/getcookies)

View File

@@ -82,7 +82,7 @@ When clicking on `clearCookies` within the command log, the console outputs the
# See also
- [clearCookie](https://on.cypress.io/api/clearcookie)
- {% url `cy.clearCookie()` clearcookie %}
- [Cypress Cookies API](https://on.cypress.io/api/cookies)
- [getCookie](https://on.cypress.io/api/getcookie)
- [getCookies](https://on.cypress.io/api/getcookies)

View File

@@ -84,4 +84,4 @@ When clicking on `clearLocalStorage` within the command log, the console outputs
# See also
- [clearCookies](https://on.cypress.io/api/clearcookies)
- {% url `cy.clearCookies()` clearcookies %}

View File

@@ -206,7 +206,7 @@ When clicking on `click` within the command log, the console outputs the followi
# See also
- [check](https://on.cypress.io/api/check)
- [dblclick](https://on.cypress.io/api/dblclick)
- {% url `.check()` check %}
- {% url `.dblclick()` dblclick %}
- [select](https://on.cypress.io/api/select)
- [submit](https://on.cypress.io/api/submit)

View File

@@ -80,7 +80,7 @@ When clicking on the `closest` command within the command log, the console outpu
# See also
- [first](https://on.cypress.io/api/first)
- {% url `.first()` first %}
- [parent](https://on.cypress.io/api/parent)
- [parents](https://on.cypress.io/api/parents)
- [parentsUntil](https://on.cypress.io/api/parentsuntil)

View File

@@ -43,7 +43,7 @@ Specify a selector to filter DOM elements containing the text. Cypress will *ign
**{% fa fa-angle-right %} options** ***(Object)***
Pass in an options object to change the default behavior of `cy.contains`.
Pass in an options object to change the default behavior of `cy.contains()`.
Option | Default | Notes
--- | --- | ---

View File

@@ -77,4 +77,4 @@ When clicking on `dblclick` within the command log, the console outputs the foll
# See also
- [click](https://on.cypress.io/api/click)
- {% url `.click()` click %}

View File

@@ -115,7 +115,7 @@ When clicking on the `eq` command within the command log, the console outputs th
# See also
- [first](https://on.cypress.io/api/first)
- {% url `.first()` first %}
- [last](https://on.cypress.io/api/last)
- [next](https://on.cypress.io/api/next)
- [prev](https://on.cypress.io/api/prev)

View File

@@ -150,7 +150,7 @@ cy
**Using an alias to access a fixture**
You can make use of aliasing, [`.as()`](https://on.cypress.io/api/as), instead of working directly with the yielded data.
You can make use of aliasing, {% url `.as()` as %}, instead of working directly with the yielded data.
Using an alias provides the benefit of terseness and readability. It also makes it easier to access the data later in your tests.

View File

@@ -96,7 +96,7 @@ When clicking on the `focus` command within the command log, the console outputs
# See also
- [blur](https://on.cypress.io/api/blur)
- [click](https://on.cypress.io/api/click)
- {% url `.blur()` blur %}
- {% url `.click()` click %}
- [focused](https://on.cypress.io/api/focused)
- [type](https://on.cypress.io/api/type)

View File

@@ -82,5 +82,5 @@ When clicking on the `focused` command within the command log, the console outpu
# See also
- [blur](https://on.cypress.io/api/blur)
- {% url `.blur()` blur %}
- [focus](https://on.cypress.io/api/focus)

View File

@@ -32,9 +32,9 @@ A selector used to filter matching DOM elements.
**{% fa fa-angle-right %} alias** ***(String)***
An alias as defined using the [`.as()`](https://on.cypress.io/api/as) command and referenced with the `@` character and the name of the alias.
An alias as defined using the {% url `.as()` as %} command and referenced with the `@` character and the name of the alias.
Internally, Cypress keeps a cache of all aliased elements. If the element currently exists in the DOM, it is immediately returned. If the element no longer exists, Cypress will re-query the element based on the previous selector path defined before [`.as()`](https://on.cypress.io/api/as) to find it again.
Internally, Cypress keeps a cache of all aliased elements. If the element currently exists in the DOM, it is immediately returned. If the element no longer exists, Cypress will re-query the element based on the previous selector path defined before {% url `.as()` as %} to find it again.
{% note info %}
[Read about using aliases here.](https://on.cypress.io/guides/using-aliases)
@@ -137,7 +137,7 @@ When clicking on the `get` command within the command log, the console outputs t
# See also
- [as](https://on.cypress.io/api/as)
- [contains](https://on.cypress.io/api/contains)
- [find](https://on.cypress.io/api/find)
- {% url `.as()` as %}
- {% url `cy.contains()` contains %}
- {% url `.find()` find %}
- [within](https://on.cypress.io/api/within)

View File

@@ -93,8 +93,8 @@ When clicking on `getCookie` within the command log, the console outputs the fol
# See also
- [clearCookie](https://on.cypress.io/api/clearcookie)
- [clearCookies](https://on.cypress.io/api/clearcookies)
- {% url `cy.clearCookie()` clearcookie %}
- {% url `cy.clearCookies()` clearcookies %}
- [Cypress Cookies API](https://on.cypress.io/api/cookies)
- [getCookies](https://on.cypress.io/api/getcookies)
- [setCookie](https://on.cypress.io/api/setcookie)

View File

@@ -93,8 +93,8 @@ When clicking on `getCookies` within the command log, the console outputs the fo
# See also
- [clearCookie](https://on.cypress.io/api/clearcookie)
- [clearCookies](https://on.cypress.io/api/clearcookies)
- {% url `cy.clearCookie()` clearcookie %}
- {% url `cy.clearCookies()` clearcookies %}
- [Cypress Cookies API](https://on.cypress.io/api/cookies)
- [getCookie](https://on.cypress.io/api/getcookie)
- [setCookie](https://on.cypress.io/api/setcookie)

View File

@@ -86,4 +86,4 @@ When clicking on `last` within the command log, the console outputs the followin
# See also
- [first](https://on.cypress.io/api/first)
- {% url `.first()` first %}

View File

@@ -77,4 +77,4 @@ When clicking on `log` within the command log, the console outputs the following
# See also
- [exec](https://on.cypress.io/api/exec)
- {% url `cy.exec()` exec %}

View File

@@ -84,4 +84,4 @@ When clicking on `not` within the command log, the console outputs the following
# See also
- [filter](https://on.cypress.io/api/filter)
- {% url `.filter()` filter %}

View File

@@ -90,6 +90,6 @@ When clicking on the `parent` command within the command log, the console output
# See also
- [children](https://on.cypress.io/api/children)
- {% url `.children()` children %}
- [parents](https://on.cypress.io/api/parents)
- [parentsUntil](https://on.cypress.io/api/parentsuntil)

View File

@@ -89,6 +89,6 @@ When clicking on the `parents` command within the command log, the console outpu
# See also
- [children](https://on.cypress.io/api/children)
- {% url `.children()` children %}
- [parent](https://on.cypress.io/api/parent)
- [parentsUntil](https://on.cypress.io/api/parentsuntil)

View File

@@ -103,5 +103,5 @@ When clicking on "Next: 'click'" at the top of the Command Log, the Command Log
# See also
- [Cypress Dashboard](https://on.cypress.io/dashboard)
- [debug](https://on.cypress.io/api/debug)
- {% url `cy.debug()` debug %}
- [screenshot](https://on.cypress.io/api/screenshot)

View File

@@ -171,6 +171,6 @@ When clicking on the `readFile` command within the command log, the console outp
# See also
- [Creating Fixtures](https://on.cypress.io/guides/creating-fixtures)
- [exec](https://on.cypress.io/api/exec)
- {% url `cy.exec()` exec %}
- [fixture](https://on.cypress.io/api/fixture)
- [writeFile](https://on.cypress.io/api/writefile)

View File

@@ -211,7 +211,7 @@ In other words, `cy.request()` transparently performs all of the underlying func
# See also
- [exec](https://on.cypress.io/api/exec)
- {% 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)

View File

@@ -459,7 +459,7 @@ When clicking on `XHR Stub` within the Command Log, the console outputs the foll
# See also
- [as](https://on.cypress.io/api/as)
- {% url `.as()` as %}
- [fixture](https://on.cypress.io/api/fixture)
- [Guide: Network Requests](https://on.cypress.io/guides/network-requests-xhr)
- [Recipe: Loggin in - XHR Web Form](https://github.com/cypress-io/cypress-example-recipes/blob/master/cypress/integration/logging_in_xhr_web_form_spec.js)

View File

@@ -113,6 +113,6 @@ When clicking on `screenshot` within the command log, the console outputs the fo
# See also
- [debug](https://on.cypress.io/api/debug)
- {% url `cy.debug()` debug %}
- [Cypress Dashboard](https://on.cypress.io/dashboard)
- [pause](https://on.cypress.io/api/pause)

View File

@@ -145,4 +145,4 @@ When clicking on `select` within the command log, the console outputs the follow
# See also
- [click](https://on.cypress.io/api/click)
- {% url `.click()` click %}

View File

@@ -94,8 +94,8 @@ When clicking on `setCookie` within the command log, the console outputs the fol
# See also
- [clearCookie](https://on.cypress.io/api/clearcookie)
- [clearCookies](https://on.cypress.io/api/clearcookies)
- {% url `cy.clearCookie()` clearcookie %}
- {% url `cy.clearCookies()` clearcookies %}
- [Cypress Cookies API](https://on.cypress.io/api/cookies)
- [getCookie](https://on.cypress.io/api/getcookie)
- [getCookies](https://on.cypress.io/api/getcookies)

View File

@@ -6,7 +6,7 @@ comments: true
Make an assertion.
{% note info %}
An alias of [`.and()`](https://on.cypress.io/api/and)
An alias of {% url `.and()` and %}
{% endnote %}
{% note info %}
@@ -221,7 +221,7 @@ cy
Cypress makes it easy to chain assertions together.
In this example we use [`.and()`](https://on.cypress.io/api/and) which is identical to `.should()`.
In this example we use {% url `.and()` and %} which is identical to `.should()`.
```javascript
// our subject is not changed by our first assertion,
@@ -278,5 +278,5 @@ When clicking on `assert` within the command log, the console outputs the follow
# See also
- [and](https://on.cypress.io/api/and)
- {% url `.and()` and %}
- [Assertions](https://on.cypress.io/guides/making-assertions)

View File

@@ -77,6 +77,7 @@ cy.getCookies().spread(function(cookie1, cookie2, cookie3){
# See also
- {% url `.each()` each %}
- [getCookies](https://on.cypress.io/api/getcookies)
- [then](https://on.cypress.io/api/then)
- [wait](https://on.cypress.io/api/wait)

View File

@@ -60,7 +60,7 @@ expect(util.addListeners).to.be.called
## Alias a spy
Adding an alias using [`.as()`](https://on.cypress.io/api/as) to spies makes them easier to identify in error messages and Cypress' command log.
Adding an alias using {% url `.as()` as %} to spies makes them easier to identify in error messages and Cypress' command log.
```javascript
const obj = {
@@ -114,8 +114,8 @@ When clicking on the `spy-1` event within the command log, the console outputs t
# See also
- [as](https://on.cypress.io/api/as)
- [clock](https://on.cypress.io/api/clock)
- {% url `.as()` as %}
- {% url `cy.clock()` clock %}
- [Guide: Stubs, Spies and Clocks ](https://on.cypress.io/guides/stubs-spies-clocks)
- [Recipe: Controlling Behavior with Spies, Stubs, and Clocks](https://github.com/cypress-io/cypress-example-recipes#controlling-behavior-with-spies-stubs-and-clocks)
- [stub](https://on.cypress.io/api/stub)

View File

@@ -105,7 +105,7 @@ expect(removeStub).to.be.called
## Alias a stub
Adding an alias using [`.as()`](https://on.cypress.io/api/as) to stubs makes them easier to identify in error messages and Cypress' command log.
Adding an alias using {% url `.as()` as %} to stubs makes them easier to identify in error messages and Cypress' command log.
```javascript
const obj = {
@@ -160,8 +160,8 @@ When clicking on the `(stub-1)` event within the command log, the console output
# See also
- [as](https://on.cypress.io/api/as)
- [clock](https://on.cypress.io/api/clock)
- {% url `.as()` as %}
- {% url `cy.clock()` clock %}
- [Guide: Stubs, Spies and Clocks ](https://on.cypress.io/guides/stubs-spies-clocks)
- [Recipe: Controlling Behavior with Spies, Stubs, and Clocks](https://github.com/cypress-io/cypress-example-recipes#controlling-behavior-with-spies-stubs-and-clocks)
- [Recipe: Unit Test - Stubbing Dependencies](https://github.com/cypress-io/cypress-example-recipes#unit-test---stubbing-dependencies)

View File

@@ -79,5 +79,5 @@ When clicking on `submit` within the command log, the console outputs the follow
# See also
- [click](https://on.cypress.io/api/click)
- {% url `.click()` click %}
- [type](https://on.cypress.io/api/type)

View File

@@ -131,7 +131,7 @@ cy.get('button').click().then(function($button){
# See also
- [and](https://on.cypress.io/api/and)
- {% url `.and()` and %}
- [invoke](https://on.cypress.io/api/invoke)
- [Issuing Commands](https://on.cypress.io/guides/issuing-commands)
- [its](https://on.cypress.io/api/its)

View File

@@ -94,7 +94,7 @@ When clicking on the `tick` command within the command log, the console outputs
# See also
- [clock](https://on.cypress.io/api/clock)
- {% url `cy.clock()` clock %}
- [Guide: Stubs, Spies and Clocks ](https://on.cypress.io/guides/stubs-spies-clocks)
- [Recipe: Controlling Behavior with Spies, Stubs, and Clocks](https://github.com/cypress-io/cypress-example-recipes#controlling-behavior-with-spies-stubs-and-clocks)
- [spy](https://on.cypress.io/api/spy)

View File

@@ -69,4 +69,4 @@ When clicking on `title` within the command log, the console outputs the followi
# See also
- [document](https://on.cypress.io/api/document)
- {% url `cy.document()` document %}

View File

@@ -421,8 +421,8 @@ When clicking on `type` within the command log, the console outputs the followin
# See also
- [blur](https://on.cypress.io/api/blur)
- [clear](https://on.cypress.io/api/clear)
- [click](https://on.cypress.io/api/click)
- {% url `.blur()` blur %}
- {% url `.clear()` clear %}
- {% url `.click()` click %}
- [focus](https://on.cypress.io/api/focus)
- [submit](https://on.cypress.io/api/submit)

View File

@@ -106,5 +106,5 @@ When clicking on `uncheck` within the command log, the console outputs the follo
# See also
- [check](https://on.cypress.io/api/check)
- [click](https://on.cypress.io/api/click)
- {% url `.check()` check %}
- {% url `.click()` click %}

View File

@@ -101,7 +101,7 @@ When clicking on `url` within the command log, the console outputs the following
# See also
- [document](https://on.cypress.io/api/document)
- {% url `cy.document()` document %}
- [hash](https://on.cypress.io/api/hash)
- [location](https://on.cypress.io/api/location)
- [window](https://on.cypress.io/api/window)

View File

@@ -35,7 +35,7 @@ The amount of time to wait in milliseconds.
**{% fa fa-angle-right %} alias** ***(String)***
An aliased route as defined using the [`.as()`](https://on.cypress.io/api/as) command and referenced with the `@` character and the name of the alias.
An aliased route as defined using the {% url `.as()` as %} command and referenced with the `@` character and the name of the alias.
{% note info %}
[Read about using aliases here.](https://on.cypress.io/guides/using-aliases)
@@ -43,7 +43,7 @@ An aliased route as defined using the [`.as()`](https://on.cypress.io/api/as) co
**{% fa fa-angle-right %} aliases** ***(Array)***
An array of aliased routes as defined using the [`.as()`](https://on.cypress.io/api/as) command and referenced with the `@` character and the name of the alias.
An array of aliased routes as defined using the {% url `.as()` as %} command and referenced with the `@` character and the name of the alias.
**{% fa fa-angle-right %} options** ***(Object)***
@@ -236,7 +236,7 @@ When clicking on `wait` within the command log, the console outputs the followin
# See also
- [as](https://on.cypress.io/api/as)
- {% url `.as()` as %}
- [route](https://on.cypress.io/api/route)
- [server](https://on.cypress.io/api/server)
- [spread](https://on.cypress.io/api/spread)

View File

@@ -81,4 +81,4 @@ When clicking on `window` within the command log, the console outputs the follow
# See also
- [visit](https://on.cypress.io/api/visit)
- [document](https://on.cypress.io/api/document)
- {% url `cy.document()` document %}

View File

@@ -201,8 +201,8 @@ Cypress.Cookies.defaults({
# See also
- [clearCookie](https://on.cypress.io/api/clearcookie)
- [clearCookies](https://on.cypress.io/api/clearcookies)
- {% url `cy.clearCookie()` clearcookie %}
- {% url `cy.clearCookies()` clearcookies %}
- [getCookie](https://on.cypress.io/api/getcookie)
- [getCookies](https://on.cypress.io/api/getcookies)
- [setCookie](https://on.cypress.io/api/setcookie)

View File

@@ -218,7 +218,7 @@ cy.get('button').then(($el) => {
## {% fa fa-question-circle green %} How do I wait for multiple XHR requests to the same url?
You should set up an alias (using [`.as()`](https://on.cypress.io/api/as)) to a single route that matches all of the XHRs. You can then [`.wait()`](https://on.cypress.io/api/wait) on it multiple times and Cypress keeps track of how many matching XHR requests there are.
You should set up an alias (using {% url `.as()` as %}) to a single route that matches all of the XHRs. You can then [`.wait()`](https://on.cypress.io/api/wait) on it multiple times and Cypress keeps track of how many matching XHR requests there are.
```javascript
cy.server()
@@ -339,7 +339,7 @@ No, Cypress modifies network traffic in real time and therefore must sit between
## {% fa fa-question-circle green %} Can I use the Page Object pattern?
As far as page objects are concerned, you should be able to use regular JavaScript functions and aliasing with [`.as()`](https://on.cypress.io/api/as) to essentially recreate what page objects give you.
As far as page objects are concerned, you should be able to use regular JavaScript functions and aliasing with {% url `.as()` as %} to essentially recreate what page objects give you.
# Dashboard

View File

@@ -12,13 +12,13 @@ You'll notice many of these commands match the same behavior as their [jQuery co
## List of Commands
- [children](https://on.cypress.io/api/children)
- [closest](https://on.cypress.io/api/closest)
- [contains](https://on.cypress.io/api/contains)
- [eq](https://on.cypress.io/api/eq)
- [find](https://on.cypress.io/api/find)
- [filter](https://on.cypress.io/api/filter)
- [first](https://on.cypress.io/api/first)
- {% url `.children()` children %}
- {% url `.closest()` closest %}
- {% url `cy.contains()` contains %}
- {% url `.eq()` eq %}
- {% url `.find()` find %}
- {% url `.filter()` filter %}
- {% url `.first()` first %}
- [get](https://on.cypress.io/api/get)
- [last](https://on.cypress.io/api/last)
- [next](https://on.cypress.io/api/next)

View File

@@ -6,14 +6,14 @@ comments: true
There are two ways to write an assertion in Cypress.
1. **Implicit Subjects:** Using [`cy.should`](https://on.cypress.io/api/should) or [`cy.and`](https://on.cypress.io/api/and)
1. **Implicit Subjects:** Using [`cy.should`](https://on.cypress.io/api/should) or {% url `.and()` and %}
2. **Explicit Subjects:** Using `expect`
***
## Implicit Subjects with [`cy.should`](https://on.cypress.io/api/should) or [`cy.and`](https://on.cypress.io/api/and)
## Implicit Subjects with [`cy.should`](https://on.cypress.io/api/should) or {% url `.and()` and %}
Using [`cy.should`](https://on.cypress.io/api/should) or [`cy.and`](https://on.cypress.io/api/and) commands is the preferred way of making an assertion in Cypress. The subject of the assertion is inferred from the subject of the last Cypress command, which is why this is called an **implicit subject**.
Using [`cy.should`](https://on.cypress.io/api/should) or {% url `.and()` and %} commands is the preferred way of making an assertion in Cypress. The subject of the assertion is inferred from the subject of the last Cypress command, which is why this is called an **implicit subject**.
```javascript
// the implicit subject here is the first <tr>

View File

@@ -105,7 +105,7 @@ comments: false
**Features:**
- You can now use [`cy.stub()`](https://on.cypress.io/api/stub) and [`cy.spy()`](https://on.cypress.io/api/spy) synchronously. These both match the Sinon API identically. We will display `stub/spy` calls in the command log and provide the call count, arguments, context, and return values when you click on the log. Stubs are automatically reset between tests. Fixes [#377](https://github.com/cypress-io/cypress/issues/377).
- We've added our own special aliasing flavor to [`cy.stub()`](https://on.cypress.io/api/stub) and [`cy.spy()`](https://on.cypress.io/api/spy). You can use the [`.as()`](https://on.cypress.io/api/as) command and we will associate spy and stub invocations (the same way we do with XHR aliasing and route matching).
- We've added our own special aliasing flavor to [`cy.stub()`](https://on.cypress.io/api/stub) and [`cy.spy()`](https://on.cypress.io/api/spy). You can use the {% url `.as()` as %} command and we will associate spy and stub invocations (the same way we do with XHR aliasing and route matching).
- We've added [`cy.clock()`](https://on.cypress.io/api/clock) and [`cy.tick()`](https://on.cypress.io/api/tick) which are both asynchronous methods to modify timers in your application under test. We automatically apply clock (even if you invoke it before your first [`cy.visit()`](https://on.cypress.io/api/visit)) and will automatically reapply it after page load. [`cy.tick()`](https://on.cypress.io/api/tick) will enable you to control the amount of time you want passed in your application. This is great for controlling *throttled* or *debounced* functions.
- `sinon-as-promised` is automatically applied under the hood which extends Sinon and provides the `.resolves(...)` and `.rejects(...)` API's which makes it easy to stub promise returning functions.
- We support and display multiple sub spies when using Sinon's `.withArgs(...)` function.
@@ -1342,7 +1342,7 @@ Almost there:
**Bugfixes:**
- Snapshots of [`.type()`](https://on.cypress.io/api/type) and [`.select()`](https://on.cypress.io/api/select) are no longer incorrect due to aking snapshot too early. Fixes [#22](https://github.com/cypress-io/cypress/issues/22).
- Passing `{force: true}` to [`.blur()`](https://on.cypress.io/api/blur) now logs correctly in the Command Log
- Passing `{force: true}` to {% url `.blur()` blur %} now logs correctly in the Command Log
**Misc:**
@@ -1357,7 +1357,7 @@ Almost there:
**Features:**
- [`.blur()`](https://on.cypress.io/api/blur) now accepts `{force: true}` which removes error checking such as validating the element is urrently in focus
- {% url `.blur()` blur %} now accepts `{force: true}` which removes error checking such as validating the element is urrently in focus
**Bugfixes:**
@@ -1839,7 +1839,7 @@ Deprecations:
- [`.type()`](https://on.cypress.io/api/type) events should be `100%` identical to real browser `KeyboardEvents` including `charCode`, `which`, `keyCode`, `data`, etc
- [`.type()`](https://on.cypress.io/api/type) now inserts a small delay `10ms` between each keystroke to simulate a real user typing
- `input` events are now correctly fired when [`.select()`](https://on.cypress.io/api/select) chooses an `<option>`
- `change` events are now fired exactly how a browser does (when an input loses focus and its value has changed since its last focus event). You'll see these fire after you use [`.blur()`](https://on.cypress.io/api/blur) directly, or use another `action command` on another element.
- `change` events are now fired exactly how a browser does (when an input loses focus and its value has changed since its last focus event). You'll see these fire after you use {% url `.blur()` blur %} directly, or use another `action command` on another element.
**Bugfixes:**
@@ -2286,22 +2286,22 @@ Deprecations:
**Features:**
- [`.as()`](https://on.cypress.io/api/as) can now alias primitives and objects other than routes or DOM
- [`.as()`](https://on.cypress.io/api/as) automatically assigns this alias to `runnable.ctx` which makes it available synchronously
- [`.as()`](https://on.cypress.io/api/as) blacklists several reserved words and will throw if you attempt to alias as one of them
- {% url `.as()` as %} can now alias primitives and objects other than routes or DOM
- {% url `.as()` as %} automatically assigns this alias to `runnable.ctx` which makes it available synchronously
- {% url `.as()` as %} blacklists several reserved words and will throw if you attempt to alias as one of them
- [`cy.get()`](https://on.cypress.io/api/get) can now accept all alias types and will display the labels in the UI differently based on the alias type
- Cypress now displays a message when the Desktop App update is actually being applied instead of doing nothing and looking like its crashed
**Bugfixes:**
- [`.as()`](https://on.cypress.io/api/as) now throws on empty strings or non string arguments
- {% url `.as()` as %} now throws on empty strings or non string arguments
- Desktop App debug logs no longer sort in the wrong direction
- Permissions are now restored during a cypress update for the `logs` and `cache`
- Prevent 3rd party windows from gaining focus over main window
**Misc:**
- Removed `cy.assign`, this has been folded into [`.as()`](https://on.cypress.io/api/as)
- Removed `cy.assign`, this has been folded into {% url `.as()` as %}
- Updated `chokidar` to `1.0.1`
# 0.5.7
@@ -2363,7 +2363,7 @@ Deprecations:
**Misc:**
- Repurposed [`.and()`](https://on.cypress.io/api/and) to be an alias of [`.should()`](https://on.cypress.io/api/should) for chainability
- Repurposed {% url `.and()` and %} to be an alias of [`.should()`](https://on.cypress.io/api/should) for chainability
- Removed `cy.to`
# 0.5.3

View File

@@ -55,7 +55,7 @@ Of course, this is *not good*. It's clunky and difficult to figure out what is g
**Aliasing is incredibly powerful but very simple to use:**
* Create an alias with the [`cy.as`](https://on.cypress.io/api/as) command.
* Create an alias with the {% url `.as()` as %} command.
* Reference an alias with the [`cy.get`](https://on.cypress.io/api/get) or [`cy.wait`](https://on.cypress.io/api/wait) command.
Every time you reference an alias, it should be prefixed with `@`. You can think of this character as "a" for alias or you can think of an alias as a pointer (like how variables point to memory).

View File

@@ -429,7 +429,7 @@ Cypress wraps Chai, Chai-jQuery, and Chai-Sinon to provide the built-in assertio
There are two ways to write assertions in Cypress:
1. **Implicit Subjects:** Using [`cy.should`](https://on.cypress.io/api/should) or [`cy.and`](https://on.cypress.io/api/and)
1. **Implicit Subjects:** Using [`cy.should`](https://on.cypress.io/api/should) or {% url `.and()` and %}
2. **Explicit Subjects:** Using `expect`
{% note info Assertion Libraries %}
@@ -437,9 +437,9 @@ Cypress bundles [popular assertion libraries](/guides/appendices/available-asser
{% endnote %}
## Implicit Subjects with [`cy.should`](https://on.cypress.io/api/should) or [`cy.and`](https://on.cypress.io/api/and)
## Implicit Subjects with [`cy.should`](https://on.cypress.io/api/should) or {% url `.and()` and %}
Using [`cy.should`](https://on.cypress.io/api/should) or [`cy.and`](https://on.cypress.io/api/and) commands is the preferred way of making assertions in Cypress. These are typical Cypress commands, which means they apply to the current subject in the command chain.
Using [`cy.should`](https://on.cypress.io/api/should) or {% url `.and()` and %} commands is the preferred way of making assertions in Cypress. These are typical Cypress commands, which means they apply to the current subject in the command chain.
```javascript
// the implicit subject here is the first <tr>
@@ -447,7 +447,7 @@ Using [`cy.should`](https://on.cypress.io/api/should) or [`cy.and`](https://on.c
cy.get("tbody tr:first").should("have.class", "active")
```
You can chain multiple assertions together using `.and()`, which is just another name for `.should()` that makes things more readable:
You can chain multiple assertions together using {% url `.and()` and %}, which is just another name for `.should()` that makes things more readable:
```js
cy.get("#header a")