Commit Graph

12736 Commits

Author SHA1 Message Date
Zach Bloomquist 296c3b8b2b Fix darwin install comment (#6742)
* Fix darwin install comment

* build darwin on this branch

* Revert "build darwin on this branch"

This reverts commit d8cc3d5809.
2020-03-16 17:38:30 -04:00
Zach Bloomquist b44e1e77b3 release 4.2.0 [skip ci] v4.2.0 2020-03-16 16:37:52 -04:00
Zach Bloomquist 3f37753455 release 4.2.0 [skip ci] 2020-03-16 16:28:09 -04:00
Gleb Bahmutov ffd4331aa5 Support experimental features (#6265)
* add packages/server experiments

* show experiments in desktop GUI

* add intro experiments text

* conditional message

* add experiments record to start of the headless run

* keep experiments in the config, remove duplicate logic

* small tweaks

* remove experimentalComponentTesting for now, separate PR

* rearrange settings spec into sections per panel

* do not crash if there are no experiments

* return component testing experiment

* work on styling of experiments panel + adding basic tests

* update settings spec text

* add unit tests for experimental features in cypress run output

* Add styling for 'non-enabled' status sign.

* add more experiments and key whitelist in experiments GUI

* add message when there are no experiments

* fix coffeelint

* fix merge in settings spec

* trailing whitespace

* make experiments info all live in one place

* add ts lint exception

* update unit test

* update run spec

* do not show experiments panel at all without experiments

* add more comments

* Update style of ON/OFF status for experimental features.

* remove empty messaging from experiments panel (since panel is no longer shown when empty)

* remove check for 'isEmpty' when showing list

* update lock file

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2020-03-16 21:10:08 +06:30
Jennifer Shehane 28fa3c7421 Add more checks for el existence before traversing up parent els (#6708)
* add check within getFirstStickyPositionParent for $el[0] to exist

- pull out check for undefined or html/body/doc element into a shared
elements method.

* prevent more checks on undefined parents & els causing getComputedStyle to throw

* yarn-lock

* Expand isUndefinedOrHTMLBodyDoc to Cypress.dom + add types

* Add unit tests for isUndefinedOrHTMLBodyDoc method

* yarn-lock

* move 'el[0]' existence check to below other checks (right when it's needed)

* yarn-lock
2020-03-16 20:34:49 +06:30
Gleb Bahmutov 333ab85324 add Cypress.sinon type (#6725) 2020-03-16 09:17:05 -04:00
renovate[bot] d17a1b3372 chore(deps): Update dependency coffeeify to version .x 🌟 (#6734)
* chore(deps): Update coffeeify to 3.0.1 🌟

* Add coffeescript peer dep

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2020-03-16 16:35:51 +06:30
renovate[bot] 5afb639a81 chore(deps): Update dependency @cypress/json-schemas to version… (#6733)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-16 15:54:42 +06:30
renovate[bot] aeb851ef1f chore(deps): Update dependency @cypress/commit-message-install… (#6732)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-16 15:49:23 +06:30
José Chaves Neto 0a23f6460c Feat: show collapsed icon on specs list title (#6538)
* feat: show collapsed icon on specs list title

* fix: fix conflicts and add tests

* remove duplicated test case - have one test for icon and collapse behavior

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2020-03-16 14:41:35 +06:30
Jennifer Shehane c40461fa22 Don't print 'first time' message if verification is running fro… (#6640)
* don't like 'first time' message if verification is running from 'cypress verify'

* updates snapshots to remove 'first time message' from verify specs
2020-03-16 12:18:38 +06:30
renovate[bot] aad48602a4 fix(deps): Update dependency minimist to version 1.2.2 🌟 (#6726)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-16 11:41:50 +06:30
Zach Bloomquist 910ac6f077 Electron 8.1.1 (#6555)
* electron@8.1.0

* set app.allowRendererProcessReuse to true

https://github.com/electron/electron/issues/18397

* Fix taking screenshots in Electron with debug logs enabled

* explicitly use png format for Page.captureScreenshot

* don't need to do Network.enable

i believe this was done because we thought it was needed for Network.getCookies, etc, but it does not seem to be used

* yarn.lock

* remove dead code

* start and stop screencast around electron screenshots

* update debug logging

* cypress/browsers:node12.13.0-chrome80-ff73

* fix unit tests

* debug e2e tests

* detect first available servernum

* electron@8.1.1

* no reuse

* Revert " cypress/browsers:node12.13.0-chrome80-ff73"

This reverts commit 404803a169.

* cypress/browsers:node12.13.0-chrome80-ff74

* Revert "debug e2e tests"

This reverts commit 7a09e3630e.

* Revert "detect first available servernum"

This reverts commit 7ac95072b2.
2020-03-13 14:36:08 -04:00
Zach Bloomquist 9caf21a6aa Fix browser detection with multiline --versions (#6712) 2020-03-12 16:44:41 -04:00
Chris Breiding 1d848874b4 Skip flaky e2e test for now (#6711) 2020-03-12 10:34:09 -04:00
Zach Bloomquist 53be237d11 Fix proxy slowdown with intercepted HTTPS requests (#6705)
* use 2x chrome total time as benchmark

* set TLS minVersion to v1 only if connection already failed with TLS version mismatch

* correct percentile function

* assert at least 1000 requests were made

* setNoDelay on HTTPS-over-HTTPS requests

* allow for tests with HTTPS upstreams to be slightly slower

* try 3x

* add note for add'l multiplier on httpsUpstreamProxy
2020-03-11 17:24:48 -04:00
Jennifer Shehane ec027e9c3a Quote strings in DEBUG logs for easier reading (#6700)
* Quote strings in DEBUG logs for easier reading

* Use object in log instead of static strings
2020-03-11 22:25:50 +06:30
Jennifer Shehane c650c91ac0 sync all 'request' deps to use the cypress fork (#6694) 2020-03-11 21:42:14 +06:30
Joseph Weissman c5c484e272 Improve types for cy.its() with property paths (#6667)
Improve types for cy.its() with property paths
- provides additional signature for `cy.its()`
- adds kitchen sink examples for path-based property access
- improve typing for its/invoke
2020-03-11 11:00:19 -04:00
Ben Kucera dd51b41ae2 render ansi colors for file:preprocessor error message (#6535)
* show colored spec compile errors in browser reporter
2020-03-10 10:24:11 -04:00
renovate[bot] f06a181cae fix(deps): Update dependency @ffmpeg-installer/ffmpeg to versio… (#6686)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-10 12:22:26 +06:30
Zach Bloomquist 0105ca7d80 Fix taking screenshots in Electron with debug logs enabled (#6684) 2020-03-09 13:58:56 -04:00
Gleb Bahmutov 2a0bc32700 cypress cache list prints last accessed date (#6627)
* get last access timestamps and print with cache versions

* remove done TODO

* start trying to save HTML but only after snapshot text is confirmed

* store cli test output HTML as static pages

* set our color for table heading

* make code readable

* lock file again

* update saved HTML file

* refactor cache spec

* add test with no access time:
2020-03-09 09:27:54 -04:00
Joseph Weissman a565a77700 Characterize overloaded signatures of cy.clearLocalStorage more… (#6652)
* Characterize overloaded signatures of cy.clearLocalStorage more carefully

* capture clearLocalStorage signatures in kitchen sink tests
2020-03-09 10:32:43 +06:30
Zach Bloomquist 190d12e306 Pass --immutable to yarn in CI (#6670)
* Pass `--immutable` to `yarn` in CI

* update for yarn v1
2020-03-06 16:35:18 -05:00
Joseph Weissman c43451a1f6 Merge pull request #6668 from cypress-io/issue-6341-click-position-type
Provide more narrow type for click position
2020-03-06 15:56:12 -05:00
Joseph Weissman 22a6420b4b Provide more narrow type for click position
- Now gives intellisense feedback for valid arguments
  to click/dblclick/rightclick
2020-03-06 12:18:12 -05:00
Jennifer Shehane 2ba53f6837 Better handle reserved key CYPRESS_ENV being set by users to va… (#6437)
* Add warning when setting CYPRESS_ENV to non-production value

* Add warning and update error when setting CYPRESS_ENV in config to non-production value

* Update config test/to throw

* we want warning, not throw

* Rename env var to CYPRESS_INTERNAL_ENV + fix warning to actually warn when staging

* update cli snapshot to include new 'info' command

* yarn.lock

* removed the warning from config, is overboard on our own tests 😓

* cleanup from review

Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2020-03-06 16:53:48 +06:30
Chris Breiding e93e6ae0b4 Validate plugin event registration (#5356)
* Turn exception message into something human readable

* Pass ipc as parameter to invoke function

* Creating file to validate event name and handler

* Creating tests to validate_event

* Remove ipc from invoke parameter

* Removing ipc parameter being passed to validateEvent

* convert spec to js

* increase line-height for plugins error message

* refactor error messages and implementation

* fix race condition where async error in plugins file could hang run

a quick async error at the root of the plugins file had the potential to hang the run because the ‘exitEarlyWithErr’ listener was registered later than that error was emitted

this enables that error to be tracked so we can properly exit at the appropriate time

it also refactors run.js to not rely on an event emitted on the project and instead passes through an onError handler, which makes more sense since the event was only used in run.js (except for one case). it also makes for easier unit testing

* fix missing reference

* fix duplicate reference

* fix args being passed in incorrectly

* fix way args were handled in server.open

* fix exit early implementation

* fix duplicate logging

* fix unit test

* update snapshot

* fix missing reference

* add e2e test to cover plugin registration validation

* clean up after merge

* add back snapshot

* fix e2e tests

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
2020-03-05 16:00:42 -05:00
Chris Breiding edb9a98268 Allow %, &, and ? in spec file name. (#6539)
* Allow %, & in file name.

* Extract escapeFilenameInUrl

* Fix tests.

* Add test for ? (non-Windows).

* Remove platform condition. And handle when special chars are in the dir.

* Fix failure.

* Fix failure.

* add e2e test for specs with special characters

* minor refactor

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2020-03-05 12:21:29 -05:00
Chris Breiding 474b80a50f Fix race condition when there's an early asynchronous error in… (#6610)
* fix race condition when there's an async error in root of plugins file

* return the promise

* fix routes creation

* fix tests

* fix error throwing and add tests

* update snapshots

* revert changes to server.open signatures in tests

* fix test

* properly wrap error so it doesn't log twice

* slow down test to ensure plugins error occurs before run is over

* wait to log early exit error until after run start
2020-03-04 11:59:01 -05:00
Jennifer Shehane 7eed6ad581 Test Cypress in Chrome 80, FF 72, Debian 10 (#6428)
* update docker image to chrome 80 and firefox 72 image

* Use image with compatible 12.8.1 Node version

* update docker script

* improve debug logging of launched browser

* run tests with correct color depth

* force run with new cache version

* revert docker image

* Revert "revert docker image"

This reverts commit 93d03446cc.

* update gitignore

* generate 2048-bit keys

* add script to regenerate certs, if we need to do this again

* update certs (ran regenerate-certs.sh)

* copy, don't symlink - won't work on win anyways

* reregen

* cleanup

* don't use https-pem, it's too smol

see https://github.com/watson/https-pem/issues/3

* decaffeinate: Rename ca.coffee and 11 other files from .coffee to .js

* decaffeinate: Convert ca.coffee and 11 other files to JS

* decaffeinate: Run post-processing cleanups on ca.coffee and 11 other files

* https-proxy decaf cleanup

* wip: ca_version

* add versioning for CA store

* add regenerate:certs script

* add timings to ca_spec

* unneeded patch-package

* fix yarn.lock

Co-authored-by: Zach Bloomquist <github@chary.us>
2020-03-03 16:25:02 -05:00
Zach Bloomquist a4b11e1928 Use CDP to record video for Electron, record video in Electron… (#6632)
* Use CDP to record video for Electron

* Enable video recording in Electron headed

* Test video in headed + headless for all browsers

* Update e2e tests
2020-03-03 15:42:43 -05:00
Ben Kucera f94d9f59ef fix: rerunning spec in open mode w/ after hook (#6620)
- fix a bug causing specs to hang after rerunning in open mode
- allow e2e test script to accept --no-exit through the cli
2020-03-03 19:18:57 +00:00
decaffeinate 333414acbc decaffeinate: Run post-processing cleanups on electron.coffee and 4 other files
also manual cleanups
2020-03-03 12:07:23 -05:00
decaffeinate 0ee1b84af0 decaffeinate: Convert electron.coffee and 4 other files to JS 2020-03-03 12:07:23 -05:00
decaffeinate e23a604b1e decaffeinate: Rename electron.coffee and 4 other files from .coffee to .js 2020-03-03 12:07:23 -05:00
Kyle Roberts 855657d334 Add Cypress.dom.* to TS type declarations (#5298)
* add isDetached to type declaration

* add rest of dom function declarations

* remove any type union

* remove duplicate declaration

* add docstrings for documented types

* .js => .ts

* update types + tests

fix ts lint

* add Cypress.dom type tests

Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
2020-03-02 14:22:13 -05:00
Zach Bloomquist de5e672364 Update DEPLOY.md [skip ci] 2020-03-02 11:28:24 -05:00
chadoc 44c98288c3 fix(proxy): added support for jira getParent function even when not minified (#6608) 2020-03-02 10:52:46 -05:00
Zach Bloomquist 844606bced release 4.1.0 [skip ci] v4.1.0 2020-02-28 17:07:18 -05:00
Zach Bloomquist 483d494557 Reconnect to CDP on WebSocket failure (#6532)
* wip: reconnect to CDP automatically

i think we should not do this, see:
https://github.com/cypress-io/cypress/issues/5685\#issuecomment-589732584

* reconnect to CDP automatically

* cleanup

* fix unit tests

* update snapshot

* replace automation client disconnected line
2020-02-28 15:28:48 -05:00
Chris Breiding 778321786f Pass projectRoot and configFile to plugins file through config (#6317)
* decaffeinate: Rename index.coffee from .coffee to .js

* decaffeinate: Convert index.coffee to JS

* decaffeinate: Run post-processing cleanups on index.coffee

* refactor decaffeinated plugins/index.js

* decaffeinate: Rename 3_plugins_spec.coffee from .coffee to .js

* decaffeinate: Convert 3_plugins_spec.coffee to JS

* decaffeinate: Run post-processing cleanups on 3_plugins_spec.coffee

* fix wrongly removed return

* refactor e2e plugins spec, update snapshot

* pass env argument to plugins file

* decaffeinate: Rename index_spec.coffee from .coffee to .js

* decaffeinate: Convert index_spec.coffee to JS

* decaffeinate: Run post-processing cleanups on index_spec.coffee

* update plugins tests

* update scaffold snapshot

* add back server test script and document running individual tests

* add projectRoot and configFile directly to config

* normalize browsers in snapshot

* add types for configFile and projectRoot

* fix linting issues

* return return

* Merge

* remove file

* remove unnecessary returns
2020-02-28 14:13:36 -05:00
Zach Bloomquist e2ea5bf663 Fix patch-package (#6583)
* fix patch-package

- don't hoist dependencies that are patched, this way we can be assured the path is always correct
- put all patches in root postinstall so postinstall-postinstall is guaranteed to work

* wip

* Revert "fix patch-package"

This reverts commit 5583f21478.

* use per package patches

* don't ignor engines or silence

* try: make sinon patch devonly

* fix socketspec

* run full ci on this branch

* bump xcode tools to bump mac node version

* also run appveyor

* Revert "run full ci on this branch"

This reverts commit c3e52d09ec.

* Revert "also run appveyor"

This reverts commit bfe7b0499a.
2020-02-28 12:17:54 -05:00
Chris Breiding f1f766d44d Merge pull request #6599 from cypress-io/issue-6570-decaf
Decaffeinate files for plugins async error handling improvements
2020-02-28 12:15:15 -05:00
Chris Breiding 1e7f0c1fdf remove unnecessary returns 2020-02-28 11:46:27 -05:00
decaffeinate ce1aa3f799 decaffeinate: Run post-processing cleanups on spec.coffee 2020-02-28 11:39:13 -05:00
decaffeinate 1d9da41671 decaffeinate: Convert spec.coffee to JS 2020-02-28 11:38:38 -05:00
decaffeinate 1aafa23425 decaffeinate: Rename spec.coffee from .coffee to .js 2020-02-28 11:38:11 -05:00
renovate[bot] f4c22f951e fix(deps): update dependency node-machine-id to version 1.1.12… (#6595)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-02-28 14:31:26 +06:30