From 05210dc24acb647a50d45f90263c8fd3a61701a0 Mon Sep 17 00:00:00 2001 From: Gleb Bahmutov Date: Thu, 5 Oct 2017 18:38:06 +0000 Subject: [PATCH] Update package readmes for #516 (#569) * update packages/driver readme close #516 * update packages/electron readme * update packages/extension readme * update packages/http-proxy readme and cross-env * update packages/launcher readme * update bin-up * update reporter readme * update runner readme * update socket readme --- packages/driver/readme.md | 18 +++++- packages/electron/README.md | 39 ++---------- packages/extension/README.md | 61 +++--------------- packages/https-proxy/README.md | 31 +++------ packages/https-proxy/package.json | 7 +- packages/launcher/README.md | 21 +++--- packages/reporter/README.md | 51 +++------------ packages/reporter/package.json | 4 +- packages/runner/README.md | 102 +++--------------------------- packages/runner/package.json | 4 +- packages/socket/README.md | 23 +++---- packages/socket/package.json | 9 +-- 12 files changed, 92 insertions(+), 278 deletions(-) diff --git a/packages/driver/readme.md b/packages/driver/readme.md index c4905c74df..b492649969 100644 --- a/packages/driver/readme.md +++ b/packages/driver/readme.md @@ -1,8 +1,22 @@ # Cypress Driver +> JavaScript library that is loaded inside the browser that helps execute the tests + +## Install + +Root install is preferred (see `CONTRIBUTING.md`), but if you must + +* `npm install` +* `npm run build` + +## Testing + +This project is not tested, the existing test commands are obsolete and will be removed +in the future; all tests have been moved to other packages. + ## Debugging -To see logs of what the driver is doing: +To see logs of what the driver is doing from command line: ```bash DEBUG=cypress:driver npm start @@ -10,6 +24,8 @@ DEBUG=cypress:driver npm start DEBUG=cypress:driver npm run build ``` +In the browser + ```js localStorage.debug = "cypress:driver" ``` diff --git a/packages/electron/README.md b/packages/electron/README.md index efed7d8d13..f25afc7cd0 100644 --- a/packages/electron/README.md +++ b/packages/electron/README.md @@ -4,40 +4,11 @@ This is a shared lib for Cypress which manages installing + building the Cypress It is a simple wrapper that `symlinks` while in development. -## Changelog +## Install -#### 0.3.4 - *(04/20/17)* -- fix require path +Root install is preferred (see `CONTRIBUTING.md`), but if you must -#### 0.3.3 - *(04/20/17)* -- bump cypress icons dep +* `npm install` +* `npm run build` -#### 0.3.2 - *(04/20/17)* -- bump cypress coffee script and releaser dep - -#### 0.3.1 - *(11/15/16)* -- bump electron to 1.4.6 - -#### 0.3.0 - *(11/07/16)* -- bump electron - -#### 0.2.1 - *(08/26/16)* -- downgrade electron, bump node - -#### 0.2.0 - *(08/26/16)* -- bump electron to 1.3.4 - -#### 0.1.0 - *(08/26/16)* -- accept install options - -#### 0.0.4 - *(08/24/16)* -- fixed bug with paths during linux install - -#### 0.0.3 - *(08/01/16)* -- fix dep being devDep - -#### 0.0.2 - *(07/06/16)* -- accept args + cb on open - -#### 0.0.1 - *(07/06/16)* -- initial release +Note: `npm run build` just installs Electron binary for this platform diff --git a/packages/extension/README.md b/packages/extension/README.md index 7027735e3a..a5ba6e9b98 100644 --- a/packages/extension/README.md +++ b/packages/extension/README.md @@ -1,5 +1,13 @@ -# Cypress Core Extension +# Cypress packages/extension +> Chrome Extension for loading our testing code into the browser + +## Install + +Root install is preferred (see `CONTRIBUTING.md`), but if you must + +* `npm install` +* `npm run build ## Developing ### Building @@ -17,7 +25,7 @@ npm run watch-dev ### Testing ```bash -npm run test-once +npm run test ``` 1. Open Chrome @@ -27,52 +35,3 @@ npm run test-once 5. Choose **cypress-core-extension/dist** directory 6. Click **background page** to debug `background.js` 7. Click **Reload (⌘R)** to pull in changes to `manifest.json` - -## Changelog - -#### 0.4.2 - *(04/20/17)* -- bump cypress icons dep - -#### 0.4.1 - *(04/20/17)* -- bump cypress coffee script and releaser dep - -#### 0.4.0 - *(04/13/17)* -- dont write extension to dist -- emit new automation client event - -#### 0.3.6 - *(10/13/16)* -- fix #266, handle null set cookie details - -#### 0.3.5 - *(09/13/16)* -- getPathToRoot, force websocket connection only - -#### 0.3.4 - *(09/07/16)* -- do not set cookie url when already present - -#### 0.3.3 - *(09/05/16)* -- include missing app folder in release - -#### 0.3.2 - *(09/05/16)* -- reject tabs which dont start with http - -#### 0.3.1 - *(06/28/16)* -- remove querying by tab url - -#### 0.3.0 - *(06/12/16)* -- added take:screenshot - -#### 0.2.0 - *(05/22/16)* -- notify on cookie change - -#### 0.1.3 - *(05/16/16)* -- new tab content + phrasing - -#### 0.1.2 - *(05/15/16)* -- ignore theme/Cached Theme.pak - -#### 0.1.1 - *(05/15/16)* -- set lodash as dep not devDep - -#### 0.1.0 - *(05/15/16)* -- initial release -- implements cookie automation diff --git a/packages/https-proxy/README.md b/packages/https-proxy/README.md index 2519755caa..cf1a8aa1e9 100644 --- a/packages/https-proxy/README.md +++ b/packages/https-proxy/README.md @@ -1,29 +1,18 @@ # Cypress Core Extension +> Intercepts requests from the website under test + +## Install + +Root install is preferred (see `CONTRIBUTING.md`), but if you must + +* `npm install` +* `npm run build` + ## Developing **Testing** ```bash -npm run test-once +npm test ``` - -## Changelog - -#### 0.1.5 - *(04/20/17)* -- bump cypress coffee script and releaser dep - -#### 0.1.4 - *(10/21/16)* -- add server destroy to https helper - -#### 0.1.3 - *(08/24/16)* -- ref fork - -#### 0.1.2 - *(08/24/16)* -- fix segfault errors - -#### 0.1.1 - *(08/24/16)* -- fix devDep to dep - -#### 0.1.0 - *(06/28/16)* -- initial release diff --git a/packages/https-proxy/package.json b/packages/https-proxy/package.json index ba3eb147db..88568ac301 100644 --- a/packages/https-proxy/package.json +++ b/packages/https-proxy/package.json @@ -6,8 +6,8 @@ "scripts": { "start": "node index.js", "clean-deps": "rm -rf node_modules", - "test": "NODE_ENV=test $(bin-up mocha) --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json", - "test-watch": "NODE_ENV=test $(bin-up mocha) --watch", + "test": "cross-env NODE_ENV=test bin-up mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json", + "test-watch": "cross-env NODE_ENV=test bin-up mocha --watch", "https": "node https.js", "release": "releaser" }, @@ -16,8 +16,9 @@ ], "devDependencies": { "@cypress/releaser": "0.1.12", - "bin-up": "^1.0.1", + "bin-up": "^1.1.0", "chai": "^3.5.0", + "cross-env": "^5.0.5", "http-mitm-proxy": "^0.5.1", "request": "^2.72.0", "request-promise": "^3.0.0", diff --git a/packages/launcher/README.md b/packages/launcher/README.md index a30550574a..0afa3c1a4d 100644 --- a/packages/launcher/README.md +++ b/packages/launcher/README.md @@ -1,5 +1,18 @@ # Cypress Core Launcher +> Finds and launches browsers on each platform + +## Install + +Root install is preferred (see `CONTRIBUTING.md`), but if you must + +* `npm install` +* `npm run build` + +## Development + +The TypeScript source files are in `lib` folder. + ## Debugging Uses [debug](https://github.com/visionmedia/debug#readme) @@ -12,11 +25,3 @@ DEBUG=cypress:launcher npm test ## Demo To see browsers detected on your machine, just run `node index.js` - -## Changelog - -#### 0.1.1 - *(04/20/17)* -- bump cypress coffee script and releaser dep - -#### 0.1.0 -- initial release diff --git a/packages/reporter/README.md b/packages/reporter/README.md index e72b7bdf19..b079618bca 100644 --- a/packages/reporter/README.md +++ b/packages/reporter/README.md @@ -1,4 +1,4 @@ -# Cypress Core Reporter +# cypress/reporter ![Reporter](https://cloud.githubusercontent.com/assets/1157043/17947006/bffba412-6a18-11e6-86ee-af7e9c9d614e.png) @@ -17,6 +17,11 @@ The reporter shows the running results of the tests. It includes the following: * any failures/errors - Toggle-able auto-scrolling of command log +## Install + +Root install is preferred (see `CONTRIBUTING.md`), but if you must + +* `npm install` ## Development @@ -41,51 +46,11 @@ npm run build-prod - Compiles `*.scss` files to single `dist/reporter.css` ```bash -npm run watch-dev +npm run watch ``` ### Testing ```bash -npm test-once +npm test ``` - - -## Changelog - -#### 0.3.4 - *(03/07/17)* -- enable error messages to be copyable - -#### 0.3.3 - *(02/05/17)* -- display spy / stub aliases - -#### 0.3.2 - *(11/29/16)* -- display errors passed in - -#### 0.3.1 - *(10/13/16)* -- ensure command.renderProps is an object - -#### 0.3.0 - *(10/03/16)* -- snapshot pinning - -#### 0.2.0 - *(09/23/16)* -- handle being resized to any width -- fix issues with scrolling cutting off commands - -#### 0.1.7 - *(09/13/16)* -- ensure direct dependencies get installed - -#### 0.1.6 - *(09/07/16)* -- cleanup npm dist - -#### 0.1.5 - *(08/30/16)* -- bump node, guard against logs which cannot be found - -#### 0.1.4 - *(08/26/16)* -- minify prod css - -#### 0.1.3 - *(08/26/16)* -- get font-awesome from npm instead of bower - -#### 0.1.0 - *(08/23/16)* -- initial release diff --git a/packages/reporter/package.json b/packages/reporter/package.json index abc7aca70c..d476dd3bee 100644 --- a/packages/reporter/package.json +++ b/packages/reporter/package.json @@ -13,7 +13,7 @@ "clean": "zunder clean", "clean-deps": "rm -rf node_modules", "test": "node ./scripts/test.js", - "lint": "$(bin-up eslint) --fix lib/*.js scripts/*.js src/*.js* src/**/*.js*" + "lint": "bin-up eslint --fix lib/*.js scripts/*.js src/*.js* src/**/*.js*" }, "files": [ "dist" @@ -39,7 +39,7 @@ "devDependencies": { "@cypress/react-tooltip": "^0.2.5", "@cypress/releaser": "0.1.12", - "bin-up": "^1.0.0", + "bin-up": "^1.1.0", "chai": "^3.5.0", "chai-enzyme": "^0.8.0", "classnames": "^2.2.5", diff --git a/packages/runner/README.md b/packages/runner/README.md index c6d4c178f2..89edb1fa03 100644 --- a/packages/runner/README.md +++ b/packages/runner/README.md @@ -8,6 +8,11 @@ The runner is the minimal "chrome" around the user's app and has the following r - Managing the viewport size and scale - Showing the currently active URL +## Install + +Root install is preferred (see `CONTRIBUTING.md`), but if you must + +* `npm install` ## Development @@ -16,7 +21,7 @@ The runner is the minimal "chrome" around the user's app and has the following r #### For development ```bash -npm run build-dev +npm run build ``` #### For production @@ -32,102 +37,11 @@ npm run build-prod - Compiles `*.scss` files to single `dist/runner.css` ```bash -npm run watch-dev +npm run watch ``` ### Testing ```bash -npm test-once +npm test ``` - - -## Changelog - -#### 0.3.11 - *(04/12/17)* -- automation event renamed - -#### 0.3.10 - *(03/07/17)* -- set version of cypress - -#### 0.3.9 - *(02/05/17)* -- bump reporter dep - -#### 0.3.8 - *(12/05/16)* -- stop test run when there's a script error - -#### 0.3.7 - *(11/29/16)* -- send reporter side of error through the reporter - -#### 0.3.6 - *(11/27/16)* -- tweaked bundle error message - -#### 0.3.5 - *(11/21/16)* -- handle script errors - -#### 0.3.4 - *(10/13/16)* -- re-release to rebuild reporter - -#### 0.3.3 - *(10/13/16)* -- bump reporter version - -#### 0.3.2 - *(10/04/16)* -- fix flash of reverted state when toggling snapshot pinning off - -#### 0.3.1 - *(10/04/16)* -- fix issue with snapshot controls - -#### 0.3.0 - *(10/03/16)* -- snapshot pinning - -#### 0.2.0 - *(10/02/16)* -- enable resizing the reporter and persisting local app settings - -#### 0.1.16 - *(09/26/16)* -- publish with correct (prod) version of reporter - -#### 0.1.15 - *(09/23/16)* -- reset action hit box box model styles -- improve snapshot css handling - -#### 0.1.14 - *(09/19/16)* -- prevent snapshot from cycling when there's only one - -#### 0.1.13 - *(09/13/16)* -- build prod version of reporter - -#### 0.1.12 - *(09/13/16)* -- correctly interpolate contentType - -#### 0.1.11 - *(09/13/16)* -- fix for null contentType - -#### 0.1.10 - *(09/07/16)* -- bump core reporter - -#### 0.1.9 - *(09/07/16)* -- nuke iframe contents, added content type, cleanup npm dist - -#### 0.1.8 - *(08/31/16)* -- defaultCommandTimeout config + socket events - -#### 0.1.7 - *(08/30/16)* -- build prod before publishing - -#### 0.1.6 - *(08/30/16)* -- bump reporter - -#### 0.1.5 - *(08/30/16)* -- bump node, spec:changed event - -#### 0.1.4 - *(08/26/16)* -- minify prod css - -#### 0.1.3 - *(08/26/16)* -- get font-awesome from npm instead of bower - -#### 0.1.2 - *(08/23/16)* -- change file names: app.js -> runner.js & app.css -> runner.scss - -#### 0.1.0 - *(08/23/16)* -- initial release diff --git a/packages/runner/package.json b/packages/runner/package.json index a5a0591fa6..489e5ab4f9 100644 --- a/packages/runner/package.json +++ b/packages/runner/package.json @@ -12,7 +12,7 @@ "clean": "zunder clean", "clean-deps": "rm -rf node_modules", "test": "node ./scripts/test.js", - "lint": "$(bin-up eslint) --fix scripts/*.js src/*.js* src/**/*.js*" + "lint": "bin-up eslint --fix scripts/*.js src/*.js* src/**/*.js*" }, "files": [ "dist", @@ -21,7 +21,7 @@ "devDependencies": { "@cypress/react-tooltip": "^0.2.5", "@cypress/releaser": "0.1.12", - "bin-up": "^1.0.0", + "bin-up": "^1.1.0", "bluebird": "3.5.0", "chai": "^3.5.0", "chai-enzyme": "^0.7.1", diff --git a/packages/socket/README.md b/packages/socket/README.md index aeb3408af8..21398b8e90 100644 --- a/packages/socket/README.md +++ b/packages/socket/README.md @@ -1,6 +1,6 @@ # Cypress Core Socket -This is a shared lib for holding both the `socket.io` server and client. +> This is a shared lib for holding both the `socket.io` server and client. ## Usage @@ -38,29 +38,22 @@ socket.getPathToClientSource() // returns your/path/to/node_modules/socket.io-client/socket.io.js0 ``` +## Install + +Root install is preferred (see `CONTRIBUTING.md`), but if you must + +* `npm install` ## Development ### Watching ```bash -npm test +npm run test-watch ``` ### Testing ```bash -npm test-once +npm test ``` - - -## Changelog - -#### 0.2.1 - *(04/20/17)* -- bump cypress releaser dep - -#### 0.2.0 - *(06/17/16)* -- added socket.getClientVersion and socket.getClientSource methods - -#### 0.1.0 - *(04/29/16)* -- initial release diff --git a/packages/socket/package.json b/packages/socket/package.json index ac744fed61..61659083ae 100644 --- a/packages/socket/package.json +++ b/packages/socket/package.json @@ -5,8 +5,8 @@ "main": "index.js", "browser": "./lib/client.js", "scripts": { - "test": "NODE_ENV=test $(bin-up mocha) --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json", - "test-watch": "NODE_ENV=test mocha --watch", + "test": "cross-env NODE_ENV=test bin-up mocha --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json", + "test-watch": "cross-env NODE_ENV=test bin-up mocha --watch", "clean-deps": "rm -rf node_modules" }, "files": [ @@ -18,7 +18,8 @@ }, "devDependencies": { "@cypress/releaser": "0.1.12", - "bin-up": "^1.0.1", - "chai": "^3.5.0" + "bin-up": "^1.1.0", + "chai": "^3.5.0", + "cross-env": "^5.0.5" } }