Commit Graph

40 Commits

Author SHA1 Message Date
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
Zach Bloomquist
ef9b8f7b38 Launch browsers by path: --browser /path/to/browser (#3337)
* adding multiple possible binary names for linux

* windows launcher doesn't consider "binary", so don't pass it

* adding test for multiple binary names

* Stronger typing, clearer variable names

* Stronger typing, clearer variable names

* cleanup

* cleanup

* clean up type- why isn't this being linted?

* Add more aliases (#3217)

* launcher changes to use Browser throughout, also clarifying FoundBrowser/Browser distinction

* wip

* wip

* update tests to expect objects

* removing errant debugger calls

* Fixing tests

* desktop-gui: use displayName for display

* ' -> "

* launcher: add definitions for google chrome beta and unstable

* server: fallthrough to using chrome helper

* server: changes for run mode to pick correct version

* desktop-gui: add displayName to fixtures

* server: isolating bug with runmode

* browser was a string all along

* server: re-promisify browser detection

* launcher: remove chrome-beta for now, needs some more tweaking for that to work 100 percent

* launcher: cleaning up types

* launcher: fix type comflict when filtering browsers (#3258)

* launcher: cast Windows foundbrowsers

* launcher: mapSeries -> map

* launcher: clean up launcher, change 1 call in server to match

* launcher: test that browsers contains what we like it to

* whoops

* server: accept path in runmode

* launcher: changes for detectByPath [wip]

* server: update tests to use new errors

* launcher: error message cleanup

* launcher: detectByPath working with CLI client

* launcher: detectByPath tests

* launcher: cli client for detectByPath

* server: update error msg snapshot

* cli: allow passing --browser to open mode

* server: using --browser=/path/ works in run and open mode!!

* launcher: change displayName of custom browsers

* server: find browser with highest version property by default

* launcher: update tests, clean up types

* server: fix tests

* server: fix tests

* cli: update help snapshots

* launcher: tests

* server: wip

* server, launcher: clean up errors

* server: add unit tests for events

* server: change e2e helper to support custom browser strings in stdout

* server: e2e tests for browser by path

* server: if this break that

* server: clean up and fix? tests

* decoffeeate, entypescriptify

* server: fix test

* cli: fix whitespace

* cli: remove external browser notice

* server: detect a browser to use for the e2e launch-by-path test

* server: make stackTraceLinesRe not match all sentences with 'at' in them

* server, launcher: update 'not found at path' error msg

* server: clean up browser switch

* server: customBrowserPath

* server: update snapshots that were affected by the old stackLineRe

* server: update stubs

* server: update BROWSER_NOT_FOUND_BY_PATH to use error objects

* server: backticks in snapshots break snapshots

* server: forgetting to save without formatting will be my downfall

* server: remove comment

* desktop-gui: make custom browsers chosen

* desktop-gui, launcher: update tests
2019-02-16 15:12:17 -05: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
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