Commit Graph

33 Commits

Author SHA1 Message Date
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
8188a44192 cli: print NODE_OPTIONS when DEBUG=cypress... is used, close #1673 (#1675) 2018-05-15 15:51:10 -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
Brian Mann
bc6d8f0a4d cli: fixes #838 start cypress in dev by routing through the CLI (#1106)
* cli: fixes #838 start cypress in dev by routing through the CLI

- matches how we run in production better to keep parity and consistency

* cli: add coerceFalse for clarity

* cli: add global flag, update to work with windows

* server: bring into parity with root scripts

* cli: just execute start script directly to work with windows

* cli, server: fixes failing tests
2017-12-24 15:05:29 -05:00
Gleb Bahmutov
f6e87c97ad Allow http download url 1001 (#1004)
* fix: allow http: download url, close #1001

* linting

* relinting JS files
2017-12-04 14:28:29 -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
27e388fc31 cli: more comprehensive tests around cli + util, exits, rejected promises, etc 2017-09-04 02:15:43 -04:00
Brian Mann
173849f4ab cli: normalized all start methods 2017-09-04 00:00:41 -04:00
Brian Mann
42ca775755 cli: WIP, move to listr for user notifications, extract and begin refactoring into multiple tasks and files
- cleaned up lots of redundant error handling
- do not ever forcibly exit early
- add user messaging for global installations
- add user messaging for opening cypress
- enable CYPRESS_BINARY_VERSION to be set, with warning
2017-09-03 21:28:59 -04:00
Brian Mann
61bcefab91 cli: WIP rename download -> tasks, begin extracting out concerns 2017-09-02 23:53:33 -04:00
Brian Mann
f29b3b9b1f cli: code cleanup, formatting, content improvements 2017-09-02 23:34:05 -04:00
Brian Mann
1e1a58330d cli: rename exitGracefully to exit1, DRY up usage 2017-09-02 23:33:23 -04:00
Chris Breiding
1fac6d58d9 snapshot various log states (wip) 2017-09-01 17:26:08 -04:00
Chris Breiding
6535a1e6f0 cli: set cwd as project path if not installed globally 2017-08-31 16:58:50 -04:00
Gleb Bahmutov
df737cc2fc cli: remove -r alias to --record option, close #360 (#361) 2017-08-23 12:18:33 -04:00
Gleb Bahmutov
4520c2b6dd feat(run): handle failed tests returned by the cypress run (#180)
* feat(run): handle failed tests returned by the cypress run

* cli: rework errors thrown from cypress vs xvfb

* small tweak

* cli: test xvfb start error handling
2017-06-22 12:00:17 -04:00
Gleb Bahmutov
9b28249152 cli: add --detached mode 2017-06-20 11:56:49 -04:00
Loren Norman
f947e0c55d Merge remote-tracking branch 'origin/master'
# Conflicts:
#	docs/source/guides/getting-started/installing-cypress.md
2017-06-13 15:49:54 -04:00
Gleb Bahmutov
8e1776c870 Issue 146: uniform CLI error reporting (#149)
* cli: shorter install message without undefined for #146

* cli: show relative path after install

* cli: debug install process

* cli: print message if using CYPRESS_VERSION

* cli: tests for CYPRESS_VERSION install

* cli: needed version message

* cli: verify app after download on install

* cli: do not verify app on install, wait until it runs

* cli: add verify command

* cli: good messags for missing app binary

* cli: xvfb error

* add missing app error

* linting

* cli: errors reported using same function

* print stack in error message for some errors

* show path checked

* use same error mechanism for download errors

* cli: unzip should report error the same way as the rest of CLI

* update some error language

* consolidate urls in error messages

* show terminal info

* terminal check outside of code

* cli: detect CI, do not use progress bar

* cli: test mock bar

* remove context.only
2017-06-09 17:37:48 -04:00
Brian Mann
101aac9c9b cli: move cli into subfolder, refactor cli scripts
-cleanup root monorepo files
-prevent downloading cypress binary when in development
-remove app-module-path
2017-06-05 17:26:51 -04:00