Commit Graph

50 Commits

Author SHA1 Message Date
Jennifer Shehane
59404e7c6f breaking: Remove run-ctand open-ct CLI commands (#30456)
* Remove run-ct and open-ct as CLI commands

BREAKING: Remove run-ct and open-ct as CLI commands

* Add changelog entry

* add CLI to changelog
2024-10-25 11:26:41 -04:00
Jim Hays
34c8b1f884 refactor: Spellcheck (#27964)
Co-authored-by: Matthew Schile <mschile@cypress.io>
2023-10-11 10:06:10 -04:00
Matt Schile
c1a8004924 chore: added support for --runner-ui and --no-runner-ui cli options (#27582) 2023-08-18 16:32:53 -06:00
renovate[bot]
7311db00be dependency: update dependency commander to v6.2.1 🌟 (#26226)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@yahoo.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2023-04-07 09:52:25 -05:00
Alejandro Estrada
19e091d0bc feat: add --auto-cancel-after-failures flag (#25237)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Ryan Pei <ryanppei@gmail.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@yahoo.com>
2023-02-10 10:32:54 -06:00
Lachlan Miller
76129e26af merge in develop to 10.0-release 2022-03-07 10:44:26 +10:00
Blue F
196e8f62cc feat: Deprecate run-ct / open-ct, and update all examples to use --ct instead (#18422)
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2021-10-26 10:36:44 -04:00
Jessica Sachs
8d0829fb26 feat: adding electron support for cypress component testing (#15731) 2021-04-01 18:15:20 -04:00
Lachlan Miller
906b48bc69 make open-ct and run-ct public 2021-03-30 16:39:49 +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
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
Gleb Bahmutov
84d1afd27d feat: print bundled Node and Electron versions in cypress version (#9183) 2020-11-16 13:17:24 -05:00
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
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
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
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
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
Jennifer Shehane
692a3c07d9 Support --tag argument (#5164)
* Alphabetize cli options for my own sanity

* begin added tag flag

* Fix some minor grammar in cli help output + be more specific for specs description

* update snapshot based on alphabetization change

* update snapshot to include --tag in help output

* update logic for pulling out space delimited args to look through --tag and --spec flags dynamically

* Support and pass along tag flag to run and record

- show err if passed without record flag
- sanitize args into comma separated string
- display tag in record errors

* fix some tests/snapshots where 'tag' was missing

* Actually try passing in tag through tests to ensure it prints.

* Merge branch 'develop' into issue-2561-tags

# Conflicts:
#	cli/__snapshots__/cli_spec.js
#	cli/lib/cli.js
#	cli/lib/exec/run.js
#	packages/server/lib/modes/run.js
#	packages/server/lib/util/args.js

* Send 'tags' as an array to backend API

* Update json-schemas to query against 2.2.0 of postRun

- this will require a bump to json-schemas repo

* update test to reflect tags array

* update snapshot to display nightly tag

* rearrange args to alphabetical order in specs

* Add tags to runResponses / remove tag from incorrect instance post

* Fix failing specs / snapshots

* Update error messages + snapshots

* Fix snapshot that no longer displays tag arg

* fix args unit test

* remove extra slash

* add a few more cli tests

* another test just in case

* a quick unit test for displayFlags utility


Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2019-12-05 23:02:14 +06:30
Gleb Bahmutov
8c911a58ae cli: remove any leftover double quotes from group and ci build… (#5692)
* cli: remove any leftover double quotes from group and ci build id CLI args

* call function directly
2019-11-15 11:59:45 -05:00
Gleb Bahmutov
9f082d97ca Catch env variable with reserved name CYPRESS_ENV 1621 (#1626)
* server: check CYPRESS_ENV variable when merging configs

* catch invalid CYPRESS_ENV value in CLI, close #1621

* linting

* sanitize platform in test snapshot

* linting

* update error message text

* add missing comma

* fix finally merge in JS code

* pass CLI linter

* fix log reference, should be debug

* use correct sinon reference

* update message, show first part in red

* update error message text
2019-09-23 11:59:49 -04:00
Ben Kucera
fbd523615e [internal] Lint typescript, json, new eslint rules (#4449)
* temp 07/01/19 [skip ci] main lint files

* use lint-staged scripts

* fix all auto-fixable eslint errors

* manually fix lint issues in files

* temp 07/01/19 [skip ci]

* bump eslint plugin versions, update circle.yml

* [lint fix] remaining js files

* update vscode/settings.json

* add back stop-only

* use stop-only for linting .onlys

* fix verify_spec, build_spec

* update json plugin

* relint & apply corrections

* fix appveyor.yml not cleansing env vars (very bad)

* dont echo commit message in appveyor script

* retry build &

* re-add & upgrade lint-staged

* update contributing docs

* only let stop-only catch staged changes
2019-07-12 13:59:44 -04:00
Ben Kucera
5f771936e3 Fix flaky cli unit test (#3988)
* fix cli unit tests with mockfs

* mockfs fix flaky verify_spec
2019-04-17 19:10:48 -04:00
Gleb Bahmutov
e0042a2009 Upgrade snap shot it to v6 in CLI package (#3761)
* update cli_spec

* linting

* update named snapshot to have 1 to match snap-shot-it v5

* update errors spec

* linting

* update snapshot use in download_spec

* update install_spec snapshot

* linting

* update use of snapshot in unzip_spec

* update snapshot use in verify_spec

* enable all CLI specs

* no need to skip snapshot sorting

* upgrade snap-shot-it to v6 in root

* update snap-shot-it to v6 in packages/server

* need to add build script to transpile

* update cypress_spec snapshot use with names
2019-03-21 10:39:28 -04:00
Zach Bloomquist
5a0d8b5cfe Allow passing a list of space-separated specs to --spec (#3375)
* cli: add otherSpecs for varargs [wip]

* scripts: pass command-line args through to debugged command

* cli: parse space-delimited specs

* cli: undo unneeded

* cli: cleaned up parseVariableOpts, added warning

* cli: cleanup

* cli: add tests

* cli: glorious whitespace

* cli: a more robust test

* cli: better snapshot

* server: strip single-quotes around --spec arg

#2298
2019-03-15 00:42:46 -04:00
Ben Kucera
ef8b240bc0 improve cache help messages snapshot more (#2625)
* snapshot more, remove execa in tests for speed

* sub-command -> command, add snapshot

* restate execa
2019-01-25 00:34:58 -05:00
Brian Mann
2333d04a54 secure cookie error crash (#2685)
- fixes #1264 
- fixes #1321 
- fixes #1799  
- fixes #2689
- fixes #2688
- fixes #2687 	
- fixes #2686
2018-11-01 12:34:37 -04:00
Amir Rustamzadeh
f313dd0b84 iterate through specs in parallel (#2154)
- fixes: #2153
- fixes: #1566
- fixes: #1690
- fixes: #2275
- fixes: #2276
2018-08-06 07:24:19 -04:00
Ben Kucera
56e00981aa cache commands, --no-exit (#1875)
* add --no-exit, cache commands

* Manage -> Manages

* fix run, run spec

* remove comments
2018-06-05 16:19:23 -04:00
Ben Kucera
08d75f552f fix cli --version (#1803) 2018-05-29 15:39:18 -04:00
Brian Mann
1d0b35bd47 Cli env var changes (#1734)
* wip [skip ci] update

* wip [skip ci] update test

* [skip ci] fix env var

* bump sinon, create helper utility to always throw when a stub is called without being given stubbed behavior

* update failing specs

* fix some error messages

* update snapshot

* warning -> note, add snapshot tests

* change snapshot os.release, test env vars
2018-05-19 15:37:52 -04:00
Ben Kucera
8a55864ae9 CLI caching (#1699)
* WIP [skip ci] tests passing -1

* WIP [skip ci] tests passing -1

* [WIP] [skip ci] more passing tests

* add run,open,verify cli tests

* fix package.json

* fix install_spec

* rename info_spec -> state_spec

* refactor cli options

* more useful logging

* change binary location, change folder name

* fix --binary-path arg

* update error message for cache

* lib/tasks/install.js changes

* add progress for direct unzip, prefer cache with override version with url/zip

* update cli logs

* prettier logs, remove arg

* fix failing test- stub os.release

* fix cli_spec snapshot, remove group and groupid args
2018-05-16 04:34:12 -04:00
Gleb Bahmutov
1f1935b361 Show help on unknown option 837 (#1615)
* cli: if user passed unknown option, show help and exit, close #837

* cli: test unknown option output

* linting
2018-05-15 15:10:26 -04:00
Brian Mann
001a310b04 Issue 1159 (#1259)
* server: pass --cwd from CLI to use when resolving relative paths for various options

- remove unnecessary cwd manipulation in scripts/start

* server: fixes #1159, specs are normalized into an array resolved against cwd

- projectPath is now normalized against cwd as well

* server: move hosts out of CLI args, keep as config only

* server: convert spec array to string on module API

* cli: must ref root package directly

* server: fixes busted specs due to cherry pick

* server: temporary fix for specs being normalized into an array

* server: move around spec flattening earlier

* server: pass absolute path for specs

* server: revert flattening hosts into config temporarily

* server: add correct relative + absolute path to spec

* driver: normalize spec path against project

* driver: skip flaky test for now [skip ci]
2018-02-07 12:11:24 -05:00
Gleb Bahmutov
99302267df Banner to separate test output (#1190)
* cli: add mocha-banner so we can see what each test outputs

* linting
2018-01-16 13:22:00 -05:00
Brian Mann
a8dcb9671c accept a global option to force locally installed cypress into global mode (#890) 2017-11-08 17:38:27 -05:00
Gleb Bahmutov
d217d0e9d2 cli: pass group and groupId flags, close #455 (#836)
* cli: pass group and groupId flags, close #455

* upgrade commander to latest

* latest command moved options in help below command

* update tests, make sure -v, --version and version work

* run test one more time
2017-10-27 13:18:21 -04:00
Brian Mann
fa8551793b fixes #661, accept --project for cypress open 2017-09-19 11:52:44 -04:00
Brian Mann
f2591f81b3 fixes #657, accept --headed option, remove undocumented --show-headless-gui 2017-09-17 14:56:50 -04:00
Gleb Bahmutov
dca50ee6ef Pass project option (#467)
* cli: pass --project path when starting

* cli: resolve --project path automatically
2017-09-13 23:49:43 -04:00
Gleb Bahmutov
901d62b887 cli: handle help, -h and --help, close #463 (#464) 2017-09-13 14:11:36 -04:00
Gleb Bahmutov
70a7fa0572 cli: exit with error code 1 on invalid command (#461) 2017-09-13 12:37:15 -04:00
Brian Mann
a79431cd6c cli: improve version experience
-alias versions to -v and --version
-make exec/versions helper
-capture logs via logger
-simplify tests
2017-09-06 02:54:02 -04:00
Gleb Bahmutov
fb06f1ba93 cli: show error on unknown command, close #414 2017-09-05 12:58:23 -04:00
Gleb Bahmutov
a1a8038528 update the docs for version command 2017-09-05 12:23:49 -04:00
Gleb Bahmutov
844dc1fe30 cli: add version command to the CLI, close #413 2017-09-05 12:18:36 -04:00
Brian Mann
c1db121dd6 cli: disable welcome message when manually verifying, otherwise display 2017-09-05 01:26:37 -04:00
Brian Mann
48dd8983ae cli: finished implementing all tests, all green 2017-09-04 12:46:44 -04:00
Brian Mann
27e388fc31 cli: more comprehensive tests around cli + util, exits, rejected promises, etc 2017-09-04 02:15:43 -04:00
Brian Mann
77ea4fc5c2 WIP: rename all the specs, move them around, get it going! 2017-09-04 00:16:59 -04:00