231 Commits

Author SHA1 Message Date
Minijus L
6bc7e7da0f fix: use 'ca' and 'cafile' npm config options for binary download (#8877)
Co-authored-by: Zach Bloomquist <github@chary.us>
2021-05-10 22:14:54 +00:00
Adam Gastineau
b8527a2a7f feat(component-testing): Expose CT through CLI module API (#16368)
* Added testingType CLI module option

* Removed isComponentTesting custom arg and replaced with testingType

* Added default value to docstring

* Removed mutating of args

* Added Module API manual testing docs
2021-05-07 12:44:15 -04:00
Jessica Sachs
8d0829fb26 feat: adding electron support for cypress component testing (#15731) 2021-04-01 18:15:20 -04:00
Jessica Sachs
e657481ff2 Merge branch 'develop' into 7.0-release 2021-03-31 18:00:24 -04:00
Lachlan Miller
906b48bc69 make open-ct and run-ct public 2021-03-30 16:39:49 +10:00
Adam Gastineau
fa780634ca Removed experimentalComponentTesting flag 2021-03-29 10:47:52 -07:00
renovate[bot]
b52ac98a69 feat(deps): update dependency electron to version 12.x 🌟 (#15292)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zach Bloomquist <git@chary.us>
2021-03-10 15:24:00 +00:00
ElevateBart
52e97bedd5 fix: setup all missing options for run-ct
Now that run-ct is using the run command of cypress,
it can benefit from a wider range of options.
The most important for me was `--headless` but the complete list is
longer:
- `--parallel`
- `--reporter`
- `--spec`
- `--no-exit`
... among others
2021-02-12 17:15:39 -06:00
ElevateBart
c5e784de8e fix: add exit management on run-ct cli comand 2021-02-09 17:16:25 -06:00
Zach Bloomquist
09afc48e14 fix(cli): use per-pid filename for downloaded cypress zip (#14952) 2021-02-09 15:02:37 +00:00
Lachlan Miller
2d182902ca chore: update files based on TR review 2021-02-08 16:49:52 +10:00
Barthélémy Ledoux
9668694bc6 chore: make run-ct consistent with open-ct (#14902)
Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
2021-02-04 20:54:44 -05:00
Brian Mann
af26fbebe6 feat: component testing (#14479)
Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
Co-authored-by: ElevateBart <ledouxb@gmail.com>
Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
2021-02-04 15:45:16 -05:00
Jennifer Shehane
d1d15e6cfe chore: Replace usage of moment in cli / server code (#9069) 2021-01-26 13:49:21 +06:30
Dmitriy Kovalenko
3326e8a1d6 feat(component-testing): Cli changes (#14483) 2021-01-11 13:16:49 -05:00
Gleb Bahmutov
6a42af33d9 feat(cli): add --component to the version command (#9248) 2020-11-23 08:13:23 -05:00
Jennifer Shehane
bb0d98d3c6 Merge branch 'develop' into v6.0-release 2020-11-17 22:38:39 +06:30
Gleb Bahmutov
84d1afd27d feat: print bundled Node and Electron versions in cypress version (#9183) 2020-11-16 13:17:24 -05:00
Jennifer Shehane
bae9d7da73 Merge branch 'develop' into v6.0-release 2020-10-30 13:02:17 +06:30
Jennifer Shehane
61088bac2a fix: Show better error message during cypress cache list when no cache (#9023)
Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
2020-10-30 11:43:33 +06:30
Jennifer Shehane
b471a0cb87 Merge branch 'develop' into v6.0-release 2020-10-28 17:54:42 +06:30
Jennifer Shehane
3a8d9e62d4 chore: Remove code around deprecated APIs (#8951) 2020-10-27 00:45:19 +06:30
Ben Kucera
1f75c81964 fix: use modern cli compile target, remove unneeded polyfills (#8938)
Co-authored-by: Kukhyeon Heo <sainthkh@naver.com>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2020-10-26 10:39:49 -04:00
Gleb Bahmutov
3ce20beee4 fix: set status property on the module API resolved object (#8799) 2020-10-19 15:20:52 +06:30
Greg Lahaye
b56c8c8688 feat: add cache prune command (#8766)
Co-authored-by: Zach Bloomquist <github@chary.us>
2020-10-09 15:14:19 -04:00
Kukhyeon Heo
aa4772c4cf feat: Print folder sizes with cypress cache list command. (#8590) 2020-10-05 11:31:59 -04:00
renovate[bot]
f1d4026b03 feat(deps): update dependency electron to version 10.1.3 🌟 (#8406)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
2020-09-29 13:54:38 -04:00
Shenwei Wang
e62dd8d5e5 fix(cli): support to unset an env variable with an empty value (#8596)
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2020-09-22 15:55:02 -04:00
Björn Weström
121aebdf5e fix: corrected coercion of config-file argument (#8636) 2020-09-22 15:37:40 -04:00
Jennifer Shehane
125a810bb4 fix: Improve error message when binary not executable (#8438) 2020-09-11 12:23:29 -04:00
Zach Bloomquist
fe4e11ec6e feat(cli): install pre-release binaries by computing binary URL from NPM URL (#8483) 2020-09-08 17:44:37 -04:00
Gleb Bahmutov
ef2363ea78 cli: expose method that parses cypress run CLI logic (#7798)
Co-authored-by: Zach Bloomquist <github@chary.us>
2020-07-14 15:39:17 -04:00
Gleb Bahmutov
653739bb5c Handle --project "" command line argument (#7744)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2020-06-22 14:34:59 -04:00
Steve
768da16a5e feat: add quiet cli arg/module option (#7714)
* Option to disable Cypress the verbose results to stdout

--quiet mode to disable the verbose results to stdout
but still use specified formatter

* Update cli/schema/cypress.schema.json

Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>

* Cypress module support for --quiet

Cypress module support for --quiet

* Apply suggestions from code review

Co-authored-by: Zach Bloomquist <github@chary.us>

* Address feedback

Address feedback, thanks

Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
2020-06-22 11:10:35 -04:00
Gleb Bahmutov
3b6514399d Do not silence cli commands (#6909)
* always log cache path

* cache list always logs

* cypress version should always log result
2020-04-01 11:44:27 -04:00
Zach Bloomquist
d810950379 Switch request, request-promise to @cypress/ forks (#6777) 2020-03-19 11:48:24 +06:30
Zach Bloomquist
47410d50e5 Fix "Parse Error" when performing HTTP requests (#5988)
* Detect if NODE_OPTIONS are present in binary; if not, respawn

* Always reset NODE_OPTIONS, even if no ORIGINAL_

Co-authored-by: Andrew Smith <andrew@andrew.codes>

* Exit with correct code # from stub process

* Clean up based on Brian's feedback

* how process.versions is null, i have no idea, but it is

* add repro for invalid header char

* Always pass NODE_OPTIONS with max-http-header-size (#5452)

* cli: set NODE_OPTIONS=--max-http-header-size=1024*1024 on spawn

* electron: remove redundant max-http-header-size

* server: add useCli option to make e2e tests go thru cli

* server: add test for XHR with body > 100kb via CLI

* clean up conditional

* cli: don't pass --max-http-header-size in dev w node < 11.10

* add original_node_options to restore o.g. user node_options

* force no color

* Revert "Use websockets to stub large XHR response bodies instead of hea… (#5525)"

This reverts commit 249db45363.

* fix yarn.lock

* update 4_xhr_spec snapshot

* make 6_visit_spec reproduce invalid header char error

* pass --http-parser=legacy

* still set headers if an ERR_INVALID_CHAR is raised

* add --http-parser=legacy in some more places

* update http_requests_spec

* readd spawn_spec

* improve debug logging

* remove unnecessary changes

* cleanup

* revert yarn.lock to develop

* use cp.spawn, not cp.fork

to work around the Electron patch: 39baf68790/patches/node/refactor_alter_child_process_fork_to_use_execute_script_with.patch

Co-authored-by: Andrew Smith <andrew@andrew.codes>
2020-03-18 17:26:22 -04:00
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
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
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
renovate[bot]
eab801ae3f chore(deps): Update dependency eslint to version 6.8.0 🌟 (#6509)
* chore(deps): Update eslint to 6.8.0 🌟

* fix missing dangling commas for linter

* fix missing dangling commas for linter

* more lint fixes

* yarn lock

Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
2020-02-25 00:09:47 +06:30
Gleb Bahmutov
070fceff20 add "cypress info" command (#6372)
* WIP: add cli info command to list detected browsers

* print found browsers

* change to list

* start work on info command calling into binary

* move info command into binary

* print OS info during cypress info command

* add binary cache path to info command

* add browser profile path

* add memory

* get browser profile path without partition

* pick real browsers as examples

* output same info as desired

* better names

* changed colors

* add list of cached binary versions

* do not put stable into name

* add underlined link

* conditionally show profile path, only if the folder exists

* do not list cached binaries

* human-friendly memory print

* print env proxy vars

* print CYPRESS_ env variables

* use _.sample

* update order

* store cypress info output on CI as HTML page artifact

* add percy CLI screenshots

* sanitize cypress info command

* store CLI snapshots in cli/visual-snapshots folder

* update cli unit snapshot

* add cli unit test

* start e2e testing for cypress info

* add test with proxy and cypress vars

* make sure we call the binary

* stricter start check

* start unit testing modes info

* test info mode browser print

* add test for profile path

* add cypress info command to test binary Circle job

* add cypress info to test-binary-as-specific-user circle

* print cypress info --dev on circle and on appveyor

* update .gitignore

* move error in environment load to debug
2020-02-20 10:54:25 -05:00
Zach Bloomquist
09cdcdf0cb Fix cypress cache subcommands (#6348) 2020-02-06 12:58:06 -05:00
Chris Breiding
d76123b3d9 Add Firefox support (#1359)
Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
2020-02-06 10:52:13 -05:00
Chris Breiding
c491a3eda5 Merge branch 'develop' into v4.0-release 2020-01-29 12:47:11 -05:00
Gleb Bahmutov
9ac5fe3935 add unit test for xvfb options -screen 2020-01-22 12:41:14 -05:00
Lukas Weber
ee0d6fac91 fix: set explicit screen when spawning own xvfb (#6199)
fixes `cypress verify` crashes on Ubuntu 18
2020-01-22 12:35:08 -05:00
Gleb Bahmutov
e389db4089 Move binary state file to be in the version folder of the cache (#6090)
* WIP: small refactoring for clarity

* move binary state file to version dir

* add issue link
2020-01-06 16:32:03 -05:00
Zach Bloomquist
b130ffca87 Prevent Cypress from showing 200% unzip progress (#6009)
* Prevent unzipWithNode from getting called twice

* fix unzip test

* add unit test to check if unzip is called once

* add unzip test for Darwin

Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2019-12-26 12:37:09 -05:00
Zach Bloomquist
35109fb08c Chrome headless (#5676)
* always disable xvfb

* add --headless

* Revert "always disable xvfb" - it is still needed for Electron

This reverts commit 058679f4ce.

* updates

* update 3_plugins_spec

* update wording now that chrome can be headless

* fix video recording when headless

* Don't assume that chrome is headed

* update electron video recording message

* Add 2_headless_spec for Cypress.browser values

* update headless language

* still use headless by default for electron and headed for chrome

* fix up cli

* fix e2e tests

* update npm api types

* fix 2_headless_spec

* keep alphabetical ordering

* increase binary size limit

* add a comment on the cli error impl

* use _.defaults for default for headed

* fix

* _.defaults mutates
2019-12-12 12:26:32 -05:00