Commit Graph

41 Commits

Author SHA1 Message Date
Blue F
13caf93b3e Merge branch '10.0-release' into develop-10.0-release 2022-04-14 10:32:05 -07:00
Zach Bloomquist
546ed16c77 fix(cli): show additional mitigation steps for max path length error (#21047) 2022-04-14 16:23:31 +00:00
Emily Rohrbough
8c8875bdc3 chore: pull forward unification changes we can make now (#20644)
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2022-03-21 12:19:09 -05:00
Zachary Williams
110f8ae02d fix: remove --config-file false references and update types (#20643)
* fix: remove --config-file false references and update types

* cleanup tests and types, catch errors when calling open

* fix test

* remove string check

* code quality feedback
2022-03-21 22:49:14 +10:00
Tim Griesser
7c339d41c8 Merge branch 'develop' into 10.0-release
* develop: (52 commits)
  feat: use hoisted yarn install in binary build (#17285)
  fix: compile npm packages for node 12 (#18989)
  fix: show call count even if `cy.stub().log(false)`. (#18907)
  chore: Update TypeScript to 4.4.4 (#18930)
  fix: wrap playground selectors in double quotes if not included (#18442)
  fix: flaky settings_spec test (#18979)
  chore: Update Chrome (stable) to 96.0.4664.45 (#18931)
  fix: Loading of specs with % in the filename (#18877)
  chore: refactor `create` into class `$Cy` (#18715)
  chore: Update Chrome (beta) to 96.0.4664.45 (#18891)
  fix: flaky `system-tests-firefox` job (#18848)
  chore: release @cypress/webpack-preprocessor-v5.10.0
  chore: release @cypress/vue-v3.0.5
  chore: release @cypress/schematic-v1.6.0
  chore: release create-cypress-tests-v1.2.0
  release 9.0.0
  feat: ensure major release
  have conduit app wait on localhost:3000
  fix install-required-node
  use --legacy-peer-deps
  ...
2021-11-20 16:03:53 -05:00
Blue F
f967908704 fix: Exit when both --e2e and --component flags are passed in (#18855)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2021-11-12 09:15:10 -08:00
Jennifer Shehane
0273f3ebae Merge branch 'develop' into 9.0-release 2021-11-01 11:58:55 -06:00
Tim Griesser
c0d781d28f refactor: remove Ramda (#18723) 2021-11-01 13:37:33 -04:00
Emily Rohrbough
e396956534 feat: remove windows 32-bit support (#18630)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Zach Bloomquist <git@chary.us>
2021-10-29 08:54:02 -05:00
Jennifer Shehane
63236d307a fix: Update error to not indicate this 'usually' is due to deps (#17112) 2021-07-06 10:15:21 -05:00
Adam Gastineau
b8527a2a7f feat(component-testing): Expose CT through CLI module API (#16368)
* Added testingType CLI module option

* Removed isComponentTesting custom arg and replaced with testingType

* Added default value to docstring

* Removed mutating of args

* Added Module API manual testing docs
2021-05-07 12:44:15 -04:00
Jennifer Shehane
3a8d9e62d4 chore: Remove code around deprecated APIs (#8951) 2020-10-27 00:45:19 +06:30
Jennifer Shehane
125a810bb4 fix: Improve error message when binary not executable (#8438) 2020-09-11 12:23:29 -04:00
Gleb Bahmutov
653739bb5c Handle --project "" command line argument (#7744)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2020-06-22 14:34:59 -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
renovate[bot]
eab801ae3f chore(deps): Update dependency eslint to version 6.8.0 🌟 (#6509)
* chore(deps): Update eslint to 6.8.0 🌟

* fix missing dangling commas for linter

* fix missing dangling commas for linter

* more lint fixes

* yarn lock

Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
2020-02-25 00:09:47 +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
Zach Bloomquist
35109fb08c Chrome headless (#5676)
* always disable xvfb

* add --headless

* Revert "always disable xvfb" - it is still needed for Electron

This reverts commit 058679f4ce.

* updates

* update 3_plugins_spec

* update wording now that chrome can be headless

* fix video recording when headless

* Don't assume that chrome is headed

* update electron video recording message

* Add 2_headless_spec for Cypress.browser values

* update headless language

* still use headless by default for electron and headed for chrome

* fix up cli

* fix e2e tests

* update npm api types

* fix 2_headless_spec

* keep alphabetical ordering

* increase binary size limit

* add a comment on the cli error impl

* use _.defaults for default for headed

* fix

* _.defaults mutates
2019-12-12 12:26:32 -05:00
Gleb Bahmutov
64f5bf0870 catch child process killed with a signal (#5810)
* WIP: catch child process killed with a signal

* unit test getError

* we don't need custom exit code

* Update cli/lib/exec/spawn.js

Co-Authored-By: Zach Bloomquist <github@chary.us>

* Update cli/lib/errors.js

Co-Authored-By: Zach Bloomquist <github@chary.us>

* update snapshots with wording
2019-11-27 15:21:47 -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
Zach Bloomquist
79c7a6c36a Mention HTTP_PROXY if download error occurs; fall back to NPM's… (#4705)
* Mention HTTP_PROXY if download error occurs; fall back to NPM's proxy config in install

* better debug logs

* snap-shot-it@7.7.1 -> 7.8.0

* respect npm_config in server, add debug logs for proxy
2019-07-15 15:21:48 -04:00
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