Commit Graph

107 Commits

Author SHA1 Message Date
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
Adam Binks 0cb90927ce Fix typos in CLI errors.js (#1138)
* Fixed typos in errors.js

* Revert "Fixed typos in errors.js"

This reverts commit 99085af24c.

* Fixed typos in errors.js

* Fixed typo in errors spec snapshot

Hopefully tests should be passing now

* Fixed typo in verify spec snapshot
2018-01-02 13:23:35 -05:00
Brian Mann d54156e2f2 cli, fixes #921, #1113, #1126, #1127, make DEBUG logs work, show error when xvfb exits with status code 1, force tty in linux, handle colors in windows, enable logging cypress:xvfb stderr
* 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: if colors are supported then force them via env vars

- this fixes windows not displaying colors from electron because by
default isTTY is false (due to electron)

* cli: fixes #921 don't ignore stderr, inherit stdio on everything except when linux + xvfb

- filter out stderr messages coming from Xlib or libudev (from xvfb)

* cli, server: force stderr tty so that normalize tty behavior when piping

* server: drop in supports color so debug outputs more colors!

* server: remove empty line

* root: refer to cypress not monorepo

* cli: make util.supportsColor return boolean

* cl: add tests around spawn behavior with forcing colors, tty, and stdio configuration

* cli: handle xvfb onStderrData callback to output debug information

* cli: handle non zero exit code error from xvfb with special message
2017-12-24 19:03:57 -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
Chris Breiding d406018fea Add selector playground to runner (#1079)
* runner: display css selector helper and highlight on hover

* runner: use unique-selector lib

* runner: eslint auto-fixes

* upgrade zunder to 5.5.1 and update configs

* reporter: add babel deps

* runner/reporter: lock react to 15.6.2

* runner: add highlight w/ tooltip and copy-to-clipboard

* runner/reporter: upgrade react-tooltip to 0.3.1

* server: upgrade browserify-preprocessor to 1.0.2

* cli: eslint auto-fixes

* upgrade zunder to 5.5.2

* runner: add defensive style resets to selector helper highlight

* runner: ensure iframe contents exist before acting on them

* runner: hide selector helper button when tests are loading or running

* runner: use shadow dom for selector helper highlight

* runner: reset state when selector helper is disabled

* runner: rebind selector helper when snapshot changes

* runner: don’t show tooltip when hovering over selector

* runner: integrate playground input into selector helper

* runner: fix mouseover/mouseout for selector

* runner: fix selector clearing

* runner: allow selector area to scroll

* runner: enable switching between get and contains

* runner: refactor method

* runner: add tooltip to selector helper toggle

* runner: focus selector helper input when method changes

* runner: remove references to cypressEnv

* runner: keep selector even if snapshot changes

* runner: persist selector helper state instead of clearing it when things change

* runner: hide method picker when clicking outside of it

* runner: pass model into selector helper

* CSS style changes to selector helper

- merge in changes + fix conflicts

* update close icon to not be so bold

* runner: keep selector helper styles out of main runner styles

* runner: rename playgroundInfo to info

* runner: simplify selector helper model

* driver: restrict more nodes from contains selector

* runner: cleanup

* runner: move selector helper to top

* more style updates for selector-helper

* move arrow to left of cy.

* Added a 'print to console' button

* runner: use fork of unique-selector and accept attribute selectors

* runner: implement print to console

* runner: close selector helper when re-running tests

* runner: improve header responsive design

* reporter: shorten console print message and lengthen duration shown

* more styling for css selector panel.

* style changes off of conversation

* updated main dropdown button

* update colors of input on invalid / no elements to be red

* disable copy to clipboard & print to console buttons if invalid / no elements

* style disabled clipboard & print buttons

* update tooltip on click of 'print to console' to say 'printed!'

* runner: refactor header to use mobx state

* add link to docs help to selector playground

* runner: add tests for header

* runner: use the right button

* runner: add tests for selector helper

* runner: remove unused variable

* runner: focus and select input when selector helper enabled or method changed

* runner: hide tooltip when selector helper is open

* runner: keep highlight from playground unless hovering over aut

* runner: always show selector helper info

* runner: show highlight when hovering over info

* Update SelectorHelper name from old Footer

* move 'selector highlight' behavior into 'highlight button'

* Added tooltip to 'highlight' button.

* runner: some style changes to selector-helper

* runner: do not focus and select input when 'turning off inspect mode'

* runner: fix issue w/ 'close' button on helper not working.

* runner: use Cypress methods for printing elements to console. bring console messages into parity with driver

* driver: revert experimental change to contains

* reporter: fix failing tests

* runner: fix failing tests
2017-12-17 14:17:19 -05:00
Ray Gesualdo 3a538601e1 Allow skipping binary download during install (#1008)
* added CYPRESS_SKIP_BINARY_INSTALL env var check before installing

* cli: provide reason binary installation is being skipped

- more linting, why not

* cli: prettify snapshots by removing whitespace at end of line
2017-12-05 11:39: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 1b05df6d29 fixes #899 stringify reporterOptions like env and config (#900) 2017-11-09 16:38:53 -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 b3cdc6b183 Actually pass group id 455 (#840)
* actually pass group and group-id to server from cli

* test passing group and group-id from CLI to server, close #455
2017-10-27 14:42:14 -04: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
Gleb Bahmutov 46ac9aff69 server: read record key from environment variable, close #820 (#821) 2017-10-26 12:01:55 -04:00
Gleb Bahmutov 8466e374f3 working on installing from local binary file (#797)
for #701 

* working on installing from local binary file

* fix missing return

* enabled skipped zip file test

* test zip file and up in two folders

* test direct zip file install on CircleCI

* Remove artificial delays
2017-10-23 21:03:47 +00:00
Brian Mann 39c621a1c3 notes [skip ci] 2017-10-10 07:56:58 -04:00
Brian Mann c37c7d498a conditionally change stdio based on OS due to windows 2017-10-10 07:48:20 -04:00
Brian Mann 32f18547fe fixes #578 use platform instead of os conversion 2017-10-06 14:29:09 -04:00
Gleb Bahmutov 72d9fae4e0 Pass arch when downloading 559 (#562)
* pass arch= when downloading desktop binary, close #559

* unit test url function
2017-10-05 13:38:47 +00:00
Gleb Bahmutov a897e3690d pipe streams and ignore stderr, close #557 (#560) 2017-10-04 20:39:25 +00:00
Gleb Bahmutov d22eb13e92 Verify command 545 (#550)
* find single line with ping value, close #545

* linting
2017-10-03 20:50:11 +00:00
Gleb Bahmutov c244b4dca7 Merge branch 'win-binary-495' into develop 2017-10-02 21:14:40 -04:00
Gleb Bahmutov 4672b569f1 Upload tar and zip (#536)
* run linter an all

* add NPM package CI job

* more steps for NPM package

* start upload NPM package

* more work on NPM package upload

* testing upload

* move purge cache to utils

* add unique binary build and upload from CI

* pass saved urls to test-binary job

* allow CYPRESS_BINARY_VERSION to be an url right away

* put uploaded urls into /tmp folder

* use explicit json filenames

* paths instead of path

* testing cypress npm and binary

* use NPM folder beta to store temp binary and package

* refactor utils

* set env vars and trigger other test projects

* only test NPM and binary on develop branch

* enable all jobs again
2017-10-01 17:01:19 -04:00
Gleb Bahmutov 2a093afdf8 win: zip and unzip 2017-09-27 11:08:07 -07: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
Brian Mann 2b415cab4c cli: verify against installed version not package version when displaying first time opening message 2017-09-16 19:21:00 -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
Gleb Bahmutov 69b9bde074 module api: convert config object to string, close #457 (#459) 2017-09-12 20:37:50 -04:00
Gleb Bahmutov aa17d06e05 module api: normalize env option, close 437 (#441) 2017-09-09 09:19:52 -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 90a0198e94 cli: move normalize function out of core lib, and into test support 2017-09-05 01:13:00 -04:00
Brian Mann 8e9183fa2d cli: continually normalize snapshots to get passing in CI 2017-09-04 20:31:04 -04:00
Brian Mann 90a3408f1f let cypress open inherit stdio for debugging purposes 2017-09-04 18:57:35 -04:00
Brian Mann 46dcca7fd0 cli: add 'Opening Cypress...' message on first verification 2017-09-04 18:39:39 -04:00
Brian Mann 3f9c3256de cli: forked verbose renderer to prevent double error output in CI 2017-09-04 17:57:42 -04:00
Brian Mann 8e1addfab8 cli: clearer messaging when download fails 2017-09-04 16:40:41 -04:00
Brian Mann 181115a7f6 cli: whoops don't update title on progress notifications :D 2017-09-04 16:32:17 -04:00
Brian Mann 335553f94b cli: when running in CI, use a different renderer to prevent ugly stream of stdout updates 2017-09-04 16:24:41 -04:00
Brian Mann 76bb95d5fa cli: use own package.json, not the root 2017-09-04 15:39:22 -04:00
Brian Mann 48dd8983ae cli: finished implementing all tests, all green 2017-09-04 12:46:44 -04:00
Brian Mann 1001c0e1ef cli: added and updated unzip specs 2017-09-04 12:16:02 -04:00
Brian Mann 9244b164af cli: updated download specs 2017-09-04 12:15:52 -04:00
Brian Mann d9a28bf278 cli: todo line seperations 2017-09-04 11:30:05 -04:00
Brian Mann bbe2db065d cli: snapshot tests around verify 2017-09-04 11:25:11 -04:00
Brian Mann 7d41987b7b cli: WIP iterating on verify snapshots 2017-09-04 02:55:51 -04:00