Commit Graph

20 Commits

Author SHA1 Message Date
Jennifer Shehane
cacd122c67 Fix mixed use of both XVFB and Xvfb to all be Xvfb (#4262) 2019-05-21 10:33:59 -04:00
Brian Mann
77c62e010b improve CLI verify + run display warnings (#4230)
* tighten up potential xvfb display problems

- improve the warning message on possible display problems
- reuse existing helper functions for platform detection
- instead of relying on timing mechanisms, if a possible display
problem is detected on linux - capture all of the stderr silently and
if the broken gtk message is detected, retry running

* consolidated and simplified smoke testing, xvfb error logging and messaging

- added —dev support to cypress verify cli command

* fix lots of tests, restore one error message

* fixed remaining CLI tests

* console.log pong only in electron mode

* remove dead code
2019-05-17 09:12:03 -04:00
Gleb Bahmutov
d25cfacc6f Automatically retry verify and run commands on Linux if suspect DISPLAY problem (#4165)
* cli: debug explanation for XVFB

* linting

* add chai-as-promised to CLI dev

* show Linux specific error solution if cannot verify

* add todo

* chore: consolidate github issue url logic

* linting

* add npm script lint-changed to quickly eslint fix changes JS files

* retry verify with our XVFB

* update errors and tests

* update CLI tests

* add test for display error message

* fix unit test

* add successful test with retry

* finish verify retry test

* warn users if hit display problem on first verify

* try to detect display problem when running electron and retry with our xvfb

* add warning message to spawn when attempting xvfb re-run

* add test for display retry behavior on spawn

* more comments for clarity

* fix typo
2019-05-13 15:19:53 -04:00
Ben Kucera
1f0071002b Add timeout for cli/verify smoke test (#4080)
* temp 04/29/19 [skip ci] cli verify timeout

* add smoke test timeout error and tests

* cleanup code

* normalize snapshots for ci

* remove promise cancellation config

* cleanup error messaging and spacing for displaying the error details + descriptions


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-05-02 15:20:58 -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
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
Rainer Oviir
dd2ba58336 add colors for URLs in the CLI (#2493) (#2530)
This addresses #2493.

I added the chalk.blue color to all the urls in the CLI
2018-10-24 11:28:29 -04:00
Ben Kucera
ddec7db17a fix error typo (#2057) 2018-06-28 11:08:44 -04:00
Ben Kucera
f90bfbec90 update ci error msg (#1928) 2018-06-20 00:14:15 -04:00
Ben Kucera
db4a4a6d22 Improve Error logging around Cypress verify (#1986)
close #1984 improve error logging for `cypress verify`
close #1985 remove "skipping install" message to local users, keep in CI
2018-06-19 21:52:25 -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
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
1001c0e1ef cli: added and updated unzip specs 2017-09-04 12:16:02 -04:00
Brian Mann
7d41987b7b cli: WIP iterating on verify snapshots 2017-09-04 02:55:51 -04:00
Brian Mann
9a38bca34c cli: tests around install including snapshots, woo! 2017-09-04 01:47:21 -04:00
Brian Mann
8ee29f7864 cli: better error formatting, added cypress version to errors, add footer feature 2017-09-03 23:41:52 -04:00
Chris Breiding
1fac6d58d9 snapshot various log states (wip) 2017-09-01 17:26:08 -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