Files
cypress/cli
Zach Bloomquist 910ac6f077 Electron 8.1.1 (#6555)
* electron@8.1.0

* set app.allowRendererProcessReuse to true

https://github.com/electron/electron/issues/18397

* Fix taking screenshots in Electron with debug logs enabled

* explicitly use png format for Page.captureScreenshot

* don't need to do Network.enable

i believe this was done because we thought it was needed for Network.getCookies, etc, but it does not seem to be used

* yarn.lock

* remove dead code

* start and stop screencast around electron screenshots

* update debug logging

* cypress/browsers:node12.13.0-chrome80-ff73

* fix unit tests

* debug e2e tests

* detect first available servernum

* electron@8.1.1

* no reuse

* Revert " cypress/browsers:node12.13.0-chrome80-ff73"

This reverts commit 404803a169.

* cypress/browsers:node12.13.0-chrome80-ff74

* Revert "debug e2e tests"

This reverts commit 7a09e3630e.

* Revert "detect first available servernum"

This reverts commit 7ac95072b2.
2020-03-13 14:36:08 -04:00
..
2017-09-02 22:51:07 -04:00
2020-03-13 14:36:08 -04:00
2020-02-11 12:40:07 +06:30

CLI

The CLI is used to build the cypress npm module to be run within a terminal.

The CLI has the following responsibilities:

  • Allow users to print CLI commands
  • Allow users to install the Cypress executable
  • Allow users to print their current Cypress version
  • Allow users to run Cypress tests from the terminal
  • Allow users to open Cypress in the interactive Test Runner.
  • Allow users to verify that Cypress is installed correctly and executable
  • Allow users to manages the Cypress binary cache
  • Allow users to pass in options that change way tests are ran or recorded (browsers used, specfiles ran, grouping, parallelization)

Building

See scripts/build.js. Note that the built npm package will include NPM_README.md as its public README file.

Testing

Automated

From the repo's root, you can run unit tests with:

yarn test-unit --scope cypress
yarn test-watch --scope cypress
yarn test-debug --scope cypress

This will take and compare snapshots of the CLI output. To update snapshots, see snap-shot-it instructions: https://github.com/bahmutov/snap-shot-it#advanced-use

Manual

To build and test an NPM package:

  • yarn
  • yarn build

This creates build folder.

  • cd build; yarn pack

This creates an archive, usually named cypress-v<version>.tgz. You can install this archive from other projects, but because there is no corresponding binary yet (probably), skip binary download. For example from inside cypress-example-kitchensink folder

yarn add ~/{your-dirs}/cypress/cli/build/cypress-3.3.1.tgz --ignore-scripts

Which installs the tgz file we have just built from folder Users/jane-lane/{your-dirs}/cypress/cli/build.