Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b516d71
Add blank 3.5.0 changelog
jennifer-shehane Aug 23, 2019
6d988c6
Add loopback proxy config
jennifer-shehane Aug 23, 2019
b42cfa4
Add note for opening a local file. (#1990)
clarmso Aug 23, 2019
d8d9b67
Adding documentation for addition of presets for following viewports
ccodecamp Aug 27, 2019
87b1b69
Add note in 'history' of viewport indicating the version new presets …
jennifer-shehane Aug 27, 2019
ae24e63
Add cy.visit() qs option (#2042)
flotwig Sep 17, 2019
fdf8035
Merge branch 'develop' into 3.5.0-release-changes
jennifer-shehane Sep 24, 2019
b27cf76
Add examples of using the qs arg to pass in query parameters.
jennifer-shehane Sep 24, 2019
4d3effa
Merge branch 'develop' into 3.5.0-release-changes
flotwig Sep 30, 2019
5355ceb
Merge branch 'develop' into 3.5.0-release-changes
jennifer-shehane Oct 1, 2019
92b93fa
Began writing changelog for 3.5.0
jennifer-shehane Oct 1, 2019
db03ba9
Merge remote-tracking branch 'origin/3.5.0-release-changes' into 3.5.…
jennifer-shehane Oct 1, 2019
66a7fd1
Document config-file argument (#1630)
jennifer-shehane Oct 2, 2019
c7a712b
Updated more copy of changelog
jennifer-shehane Oct 1, 2019
c779f4e
Continue updating copy of changelog to be more human readable.
jennifer-shehane Oct 2, 2019
1180498
Increases max viewport from 3000 to 4000 px (#2099)
nico-bellante Oct 2, 2019
cac2cfe
Document nodeVersion configuration option (#1876)
flotwig Oct 2, 2019
23642d5
Delete English chinese doc that was accidentally pushed in
jennifer-shehane Oct 2, 2019
cec214f
Make changes to cy.route from https://github.com/cypress-io/cypress-d…
jennifer-shehane Oct 2, 2019
56cee7d
Link to config-file - start changelog of doc changes. Fix broken link
jennifer-shehane Oct 2, 2019
e19ac7e
Write more of the changelog copy including Docs updates
jennifer-shehane Oct 2, 2019
beeee40
Put correct version of Node bundled with Cypress to 12.0.0
jennifer-shehane Oct 2, 2019
0bde2ba
Correct `qs` usage in `visit.md`
flotwig Oct 3, 2019
f1388a9
added keyboard shortcuts to docs (#2131)
mishabruml Oct 7, 2019
ac3b9b0
Add padding support to element screenshot (#2139)
sebinsua Oct 11, 2019
ee0b20c
.rightclick command (#2174)
jennifer-shehane Oct 21, 2019
717491c
Simulated click fixes (#2176)
jennifer-shehane Oct 21, 2019
f855469
Continue adding new things to 3.5.0 changelog
jennifer-shehane Oct 21, 2019
3cae3a1
Add ~ cache instructions
jennifer-shehane Oct 21, 2019
19ba0c1
Add more issues to 3.5.0 changelog
jennifer-shehane Oct 21, 2019
2340263
Remove warning about video not being supported in Chrome browsers
jennifer-shehane Oct 21, 2019
620e589
Merge branch 'develop' into 3.5.0-release-changes
jennifer-shehane Oct 21, 2019
fd3fe70
Add history to screenshot to indicate it was added in 3.5.0
jennifer-shehane Oct 21, 2019
f45c53d
remove dead link to click events
jennifer-shehane Oct 21, 2019
84ec952
Minor fixes
jennifer-shehane Oct 21, 2019
0533bef
Add more fixed issues to 3.5
jennifer-shehane Oct 23, 2019
68eba82
Fix issue number that issue fixes.
jennifer-shehane Oct 23, 2019
8d6754b
Merge branch 'develop' into 3.5.0-release-changes
jennifer-shehane Oct 23, 2019
0088318
Update roadmap to reflect more current work
jennifer-shehane Oct 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ To add a page such as a new guide or API documentation:

- Add the new page to the relevant directory under [`source`](/source).
- Link to your new page in the [`sidebar.yml`](/source/_data/sidebar.yml).
- Add translations for the sidebar link (for English, this is located in [`en.yml`](/themes/cypress/languages/en.yml)).
- Add translations for the sidebar link for each supported language (for English, this is located in [`en.yml`](/themes/cypress/languages/en.yml)).
- Build the documentation site locally so that you can visually inspect your new page and the links to it.
- Copy over the new page to other language translations - Japanese docs in [`source/ja`](/source/ja), Chinese docs in [`source/zh-cn`](/source/zh-cn).
- Commit the new file using git - we auto-generate the doc to display within each supported language, this auto-generation depends on the file existing in git.
- Submit a [pull request](#Pull-Requests) for your change.

#### A Worked Example
Expand Down Expand Up @@ -167,6 +167,8 @@ Our currently supported languages can be found at [`/source/_data/languages.yml`

Translate existing documentation then submit a [pull request](#Pull-Requests) for your change.

**Note:** When adding a new doc file to the English source, the English file will need to be commited to git before the translated file is auto-generated.

If a page does not have a translation, then a pre-start step copies the English file to the language folder. These copies should NOT be committed into the source code. Only when the file has been translated you can add it to the source code with `git add --force source/<language>/.../file.md` and this file will not be overwritten by the English file.

## Committing Code
Expand Down
104 changes: 104 additions & 0 deletions source/_changelogs/3.5.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# 3.5.0

*Released 10/2/2019*

**Features:**

- We now record video during `cypress run` in Chrome, Chromium, and Canary browsers. This requires passing the name or path of the Chrome browser to the {% url "`--browser` flag" command-line#cypress-run-browser-lt-browser-name-or-path-gt %}. Addresses {% issue 4608 %}.
- There is a new {% url "`.rightclick()`" rightclick %} command to right click on DOM elements. Addresses {% issue 53 %}.
- Cypress now accepts a {% url "`--config-file` argument" command-line#cypress-run-config-file-lt-config-file-gt %} to specify a different file to be used for Cypress configuration. You can also pass `false` to the `--config-file` to not use any configuration file. Addresses {% issue 1369 %}.
- You can now use your system's Node version by setting the {% url "`nodeVersion`" configuration#Node-version %} to `system` in your configuration. This Node version will be used to build files in your {% url "`integrationFolder`" configuration#Folders-Files %} and {% url "`supportFile`" configuration#Folders-Files %} and also be used to execute code in your {% url "`pluginsFile`" configuration#Folders-Files %}. If not set, Cypress will continue to use the Node version bundled with Cypress. Addresses {% issue 4432 %}.
- {% url "`.dblclick()` dblclick %} now accepts `position`, `x`, and `y` arguments. Addresses {% issue 116 %}.
- {% url "`.dblclick()` dblclick %} now accepts `force` and `multiple` in its `options`. Addresses {% issue 116 %}.
- {% url "`.screenshot()`" screenshot %} now accepts a `padding` argument when screenshotting elements that will alter the dimensions of the screenshot of the element. Addresses {% issue 4440 %}.
- {% url "`cy.visit()`" visit %} now accepts a `qs` option representing an object of query paramaters to be used in the URL. Addresses {% issue 5034 %}.
- {% url "`cy.viewport()`" viewport %} now allows for viewport sizes up to 4,000 pixels. Addresses {% issue 5181 %}.
- {% url "`cy.viewport()`" viewport %} accepts new size presets for `iphone-xr`, `iphone-x`, `samsung-s10` and `samsung-note9`. Addresses {% issue 4967 %}.
- Passing a `~` to `CYPRESS_CACHE_FOLDER` will automatically resolve to the user's home directory. Addresses {% issue 5386 %}.

**Bugfixes:**

- {% url "`.dblclick()` dblclick %} and {% url "`.click()`" click %} now fire all appropriate mouse events including `mouseover`, `mousemove`, `mouseout`, `pointerdown`, `pointerup`, and `pointermove`. Fixes {% issue 1016 %}, {% issue 1847 %}, {% issue 2045 %}, {% issue 2521 %}, {% issue 2768 %}, {% issue 2928 %}, {% issue 2957 %}, and {% issue 3224 %}.
- We updated {% url "`.dblclick()` dblclick %} to follow the same actionability checks as {% url "`.click()`" click %}. Fixes {% issue 3798 %}.
- Coordinates clicked during {% url "`.click()`" click %} are now correct if the element being clicked is within an iframe. Fixes {% issue 4347 %}.
- We now allow {% url "`.type()`" type %} to be used on any DOM element. The element will receive all of the type events. Fixes {% issue 2166 %} and {% issue 3661 %}.
- If a typeable element gains focus during {% url "`.type()`" type %}, Cypress now continues typing into the newly focused element. Fixes {% issue 2240 %}.
- We now correctly borrow the property getter for `maxLength` when using {% url `.type()` type %} on an input. Fixes {% issue 4587 %}.
- We fixed an issue where `datetime-local` inputs would not have their `value` updated during {% url "`.type()`" type %}. Fixes {% issue 2613 %}.
- {% url "`.type()`" type %} now allows you to type `-` into number inputs with text selection. Fixes {% issue 4767 %}.
- We now fire an `input` event when using {% url "`.type()`" type %} typing `{enter}` inserts a newline. Fixes {% issue 4870 %}.
- We no longer input text when non-`{shift}` modifier keys are typed in {% url "`.type()`" type %}. Fixes {% issue 5424 %}.
- We now properly send the `code` property during keyboard events triggered during {% url "`.type()`" type %}. Fixes {% issue 3722 %}
- Cypress now sends `screenX` and `screenY` properties to events triggered using {% url "`.trigger()`" trigger %}. Fixes {% issue 3187 %}.
- We fixed a bug where Cypress could not intercept traffic sent through {% url "`cy.visit()`" visit %} to IP addresses over HTTPS, leading to `ERR_SSL_VERSION_OR_CIPHER_MISMATCH` errors. Fixes {% issue 771 %}.
- We fixed a bug introduced in {% url "3.3.0" changelog#3-3-0 %} where some HTTPS sites failed to load during {% url "`cy.visit()`" visit %} and {% url "`cy.request()`" request %} with a "handshake failed" error. Fixes {% issue 4394 %}.
- We fixed a bug where ECC SSL Certificates were not supported during {% url "`cy.visit()`" visit %} that was introduced in {% url "3.3.0" changelog#3-3-0 %}. Fixes {% issue 4368 %}.
- We fixed an issue introduced in {% url "3.4.0" changelog#3-4-0 %} that would cause the Selector Playground to not properly highlight the currently hovered element. Fixes {% issue 4872 %}.
- {% url "`Cypress.env()`" env %} now escapes `<script>` tags in the configuration file. Fixes {% issue 4952 %}.
- Cypress now properly handles converting responses of `content-type` `application/vnd.api+json` to JSON. Fixes {% issue 5165 %}.
- XHR responses in {% url "`cy.route()`" route %} that exceed 80kb in size no longer fail with an `ERR_EMPTY_RESPONSE` error. Fixes {% issue 76 %}.
- Cypress no longer crashes with `dest.end` errors on Windows machines. Fixes {% issue 2181 %}.
- The `onFocus` event no longer incorrectly fires on hidden elements. This fixes an issue introduced in {% url "3.3.2" changelog#3-3-2 %}. Fixes {% issue 4898 %}.
- You can now call {% url "`.click()`" click %} on inputs or textareas that are `readonly`. This fixes an issue introduced in {% url "3.4.1" changelog#3-4-1 %}. Fixes {% issue 4874 %}.
- Cypress no longer crashes with a `"port" option should be a number or string` error when receiving an erroneous HTTP CONNECT. Fixes {% issue 3250 %}.
- Cypress tests now timeout if there are no Cypress commands enqueue and the `done()` callback is not called within the `commandTimeout`. Fixes {% issue 1075 %}, {% issue 2478 %}, {% issue 3349 %}, and {% issue 4790 %}.
- We fixed a bug where Cypress would exit with an `ENOTCONN` error at the end of a test run when using Node >12.11.0 on Windows OS. Fixes {% issue 5241 %}.
- We fixed a bug where the Chrome policy warnings introduced in {% url "3.4.0" changelog#3-4-0 %} would not appear. Fixes {% issue 4986 %}.
- We improved the way that cookies are handled for Chrome browsers. This fixes an issue when parsing cookies that were set with a domain beginning with a `.` in Chrome 77. Fixes {% issue 5142 %} and {% issue 5206 %}.
- We fixed a bug when visiting an application that does an HTTP request to a `.js` file containing Unicode transferred using `Content-Encoding: gzip` that could cause the JavaScript file to become corrupted. Fixes {% issue 1746 %}.
- We now normalize the Cypress cache folder to resolve in the current folder and not with respect to the `node_modules/cypress` folder. Fixes {% issue 2364 %}.

**Misc:**

- Cypress now displays a more precise error message when checking an element's visibility if an element is detached from the DOM. Addresses {% issue 4946 %}.
- We increased the timeout to wait for Xvfb to start from 5 seconds to 30 seconds. This should resolve some issues where the error `Could not start Xvfb` was being thrown because Xvfb could not start within the allowed time. Addresses {% issue 5110 %}.
- We now warn when using `cypress run` from the binary directly (not from an npm module) since this is not its intended use. Addresses {% issue 1573 %}.
- We now warn on {% url "`cy.visit('file://...)`" visit %} to explain that this url format is not supported and suggest visiting a relative HTML file. Addresses {% issue 4452 %}.
- Setting the reserved `CYPRESS_ENV` environment variable will now throw an error. Addresses {% issue 1621 %}.
- We now throw a better error when passing in an Object to the {% url "`browser`" browser-launch-api %} argument of the Browser Launch API explaining that a String is expected instead. Addresses {% issue 4966 %}.
- An error will now be thrown if an invalid `name` or `value` is supplied to {% url "`cy.setCookie()`" setcookie %}, matching the RFC 6265 compliant validation of cookie names and values. Addresses {% issue 5206 %}.
- Passing an invalid type to the 2nd argument of {% url "`cy.get()`" get %} now throws an error explaining that an `options` Object is expected. Addresses {% issue 2953 %}.
- We now throw a more helpful error message during {% url "`cy.screenshot()`" screenshot %} that would result in a screenshot with 0 width or height. Addresses {% issue 5149 %}.
- Stdout printed during `cypress run` no longer truncates text such a filenames and instead wraps the text to fit within the width of the terminal. Addresses {% issue 4977 %}.
- We now display up to 2,000 characters of HTTP property values within error messages during {% url "`cy.request()`" request %} errors. Addresses {% issue 3145 %}.
- Cypress now always considers `localhost` to be in `NO_PROXY`. To make Cypress send traffic for `localhost` through the proxy, you will now have to pass `<-loopback>` in `NO_PROXY`. Addresses {% issue 4780 %}.
- We changed the way cookies are set in {% url "`cy.visit()`" visit %} to more closely match the browser's behavior when setting cookies, particularly when using `fetch` with cookies. Addresses {% issue 4433 %}.
- We've added more flags to send to Chrome upon launch that should help with issues encountered during browser automation including `--disable-backgrounding-occluded-window`, `--disable-breakpad`, `--disable-ipc-flooding-protection`, `--password-store=basic`, and `--use-mock-keychain`. Addresses {% issue 5132 %} and {% issue 3633 %}.
- Scrolling the specs list now only scrolls the list of spec files and no longer scrolls the search and filter bar. Addresses {% issue 4904 %}.
- We fixed some layout issues within the Test Runner that were introduced in {% url "3.4.1" changelog#3-4-1 %}. Addresses {% issue 4888 %}, {% issue 4912 %}, and {% issue 4959 %}.
- The counter badge for spies and stubs no longer appears visually cut off. Fixes {% issue 4822 %}.
- TypeScript 3.6.2 no longer errors due to outdated jQuery types. Addresses {% issue 5065 %}.
- We updated types for {% url "`Cypress.Commands.overwrite()`" custom-commands %} to not allow an `options` object as an argument. Addresses {% issue 5341 %}.
- We added `failures` and `message` types when a run fails using the {% url "Module API" module-api %}. Addresses {% issue 5335 %}.
- We're continuing to make process in converting our codebase from CoffeeScript to JavaScript. Addresses {% issue 2690 %} in {% PR 4869%}, {% PR 4906 %}, {% PR 5096 %}, {% PR 5107 %}, {% PR 5156 %}, {% PR 5173 %}, and {% PR 5352 %}.

**Documentation Changes:**

- Added a {% url "`.rightclick()`" rightclick %} doc.
- Added a {% url "Webinars" webinars-media %} doc containing videos of all of the official Cypress webcasts.
- Updated the {% url "`.dblclick()`" dblclick %} doc to include new `position`, `x`, and `y` arguments plus `force` and `multiple` options.
- Added the `--config-file` argument to {% url "Command Line" command-line %} and {% url "Module API" module-api %} doc.
- Added the `nodeVersion` argument to {% url "Configuration" configuration %} doc and mentioned its uses in the {% url "Plugins Guide" plugins-guide %} and {% url "Writing a Plugin" writing-a-plugin %} doc.
- Updated all docs to mention 'configuration file' instead of static `cypress.json` file since this is not configurable via a `--config-file` argument.
- Added `qs` option to {% url "`cy.visit()`" visit#Arguments %} with examples.
- Added `padding` option to {% url "`cy.screenshot()`" screenshot %} with examples.
- Updated the {% url "`cy.viewport()`" viewport %} doc to have a max viewport size of `4000`.
- Added newly supported viewport sizes to the {% url "`cy.viewport()`" viewport %} doc.
- Documented new keyboard shortcuts in the {% url 'Test Runner' test-runner %} doc.
- Added a new section on troubleshooting problems with Xvfb to the {% url "Continuous Integration" continuous-integration#Xvfb %} doc.
- Added a section to our {% url "Debugging" debugging#Cypress-fiddle %} doc about our `cypress-fiddle` plugin used for playing around with small test cases.
- Added a section to our {% url "Debugging" debugging#Patch-Cypress %} doc explaining how to patch an installed version of Cypress.
- Mention not needing to decode portions of the `url` in the {% url "`cy.route()`" route %} doc.
- Mention that the `file://` prefix is not supported in the {% url "`cy.visit()`" visit %} doc.
- Add a note about when passing `<-loopback>` in `NO_PROXY` is necessary in the Proxy Configuration doc.
- Updated our Dashboard docs to include screenshots containing our new Dashboard navigation design.
- We have some newly translated documentation in Portuguese. If you'd like to help in translating more, please open a pull request in our {% url "documentation repo" https://github.com/cypress-io/cypress-documentation %}.

**Dependency Updates**

- Upgraded Chrome browser version used during `cypress run` and when selecting Electron browser in `cypress open` from `61` to `73`. Addressed in {% PR 4720 %}.
- Upgraded `electron` from `2.0.18` to `5.0.10`. Addressed in {% PR 4720 %}.
- Upgraded `node` from `8.9.3` to `12.0.0`. Addressed in {% PR 4720 %}.
- Upgaded `jquery` from `2.2.4` to `3.1.1`. Addressed in {% PR 1229 %}.
- Upgraded `sanitize-filename` from `1.6.1` to `1.6.3`. Addressed in {% PR 5216 %}.
- Upgraded `@cypress/get-windows-proxy` from `1.5.4` to `1.6.0`. Addressed in {% PR 5108 %}.
1 change: 1 addition & 0 deletions source/_data/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ api:
readfile: readfile.html
reload: reload.html
request: request.html
rightclick: rightclick.html
root: root.html
route: route.html
screenshot: screenshot.html
Expand Down
39 changes: 9 additions & 30 deletions source/api/commands/click.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ Sequence | Notes

```js
// execute a SHIFT + click on the first <li>
// {release: false} is necessary so that
// { release: false } is necessary so that
// SHIFT will not be released after the type command
cy.get('body').type('{shift}', { release: false })
.get('li:first').click()
cy.get('li:first').click()
```

# Notes
Expand All @@ -154,24 +154,6 @@ cy.get('body').type('{shift}', { release: false })

`.click()` is an "action command" that follows all the rules {% url 'defined here' interacting-with-elements %}.

## Events

### Events that are fired:

```javascript
cy.get('button').click()
// mousedown
// focus
// mouseup
// 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 %} 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 %} if you need this to be fixed.

## Focus

### Focus is given to the first focusable element
Expand All @@ -186,14 +168,6 @@ However, Cypress additionally handles situations where a child descendent is cli

If the mousedown event has its default action prevented (`e.preventDefault()`) then the element will not receive focus as per the spec.

### 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 %} if you need this to be fixed.

### pointer-events: none

Cypress does not currently factor in `pointer-events: none` in its clicking algorithm. {% open_an_issue %} if you need this to be fixed.

# Rules

## Requirements {% helper_icon requirements %}
Expand All @@ -210,10 +184,10 @@ Cypress does not currently factor in `pointer-events: none` in its clicking algo

# Command Log

***Click the button in the form that has text "Create User"***
***Click the button***

```javascript
cy.get('form').find('button').contains('Create User').click()
cy.get('.action-btn').click()
```

The commands above will display in the Command Log as:
Expand All @@ -224,10 +198,15 @@ When clicking on `click` within the command log, the console outputs the followi

{% imgTag /img/api/click/click-coords-and-events-in-console.png "console.log for click" %}

{% history %}
{% url "3.5.0" changelog#3-5-0 %} | Added sending `mouseover`, `mousemove`, `mouseout`, `pointerdown`, `pointerup`, and `pointermove` during `.click()`
{% endhistory %}

# See also

- {% url `.check()` check %}
- {% url `.dblclick()` dblclick %}
- {% url `.rightclick()` rightclick %}
- {% url `.select()` select %}
- {% url `.submit()` submit %}
- {% url `.type()` type %}
Loading