Commit Graph

195 Commits

Author SHA1 Message Date
Gleb Bahmutov cf07e21d23 Fix engines 1373 (#1375)
* fix: use engines from CLI package, close #1373

* chore: add integration test for build script that writes package.json file

* do not hardcode version

* build npm package in this branch too
2018-02-25 21:04:12 -05:00
Brian Mann 46c1c21ea5 schema: add new modifyObstructiveCode option [skip ci] 2018-02-16 00:42:17 -05:00
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
Nicholas Boll 88f534bf08 fix: Incorrect type for 'then' returning a wrapped 'undefined' (#1220) 2018-02-04 14:45:42 -05:00
Gleb Bahmutov 99302267df Banner to separate test output (#1190)
* cli: add mocha-banner so we can see what each test outputs

* linting
2018-01-16 13:22:00 -05:00
Nicholas Boll ae8b147e28 feat: Add TypeScript support for Cypress action events (#1187)
* feat: Add support for Cypress action events

* fix: Fixed documentation URL for actions

* fix dtslint test failures
2018-01-16 10:59:00 -05:00
Nicholas Boll a51ea1f783 doc: should/and chainer autocomplete (#1132)
* fix: within type definition

* doc: should/and chainer autocomplete

* chore: Updated example documentation to match #1117
2018-01-09 17:05:55 -05:00
Sam a7d0cff93f Fixing incorrect type for supportFile (#1167) 2018-01-09 16:59:38 -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 17d1f85ec8 cli: bump xvfb 2017-12-25 00:07:36 -05:00
Brian Mann 3dafede470 server: fixes #977, capture stdout in windows (#1129)
* server: fixes #977, capture stdout in windows

* driver: skip flaky tests for now

* root: fix breaking eslint due to 4.14.0

* cli: bump xvfb to make node4 happy

* cli: bump xvfb fix context
2017-12-24 21:49:00 -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
Gleb Bahmutov aa0a41caf5 Doc ts better 1117 (#1122)
* ts: document common assertions, cy and Cypress

* document more common methods

* more comments for #1117

* todomvc examplehas good intellisense, close #1117
2017-12-24 18:25:06 -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
Gleb Bahmutov ad0357dce0 cli: upgrade debug and extract-zip, close #1103 (#1104) 2017-12-21 20:17:29 -05:00
Gleb Bahmutov d865439367 add cypress.schema.json close #1109 (#1112) 2017-12-20 21:02:01 -05:00
Nicholas Boll 233ddf8d7b fix: Unwrap subject returned by cy.then (#1085)
* fix: Unwrap subject returned by cy.then

* update to use Cypress.Promise
2017-12-19 11:15:05 -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
Nicholas Boll a06ca4a19b chore: Add extra chainer types for auto-complete (#1059) 2017-12-14 16:47:39 -05:00
Nicholas Boll 5d761630f2 chore: Update type definitions to match API more closely (#1048)
* chore: Fill out Cypress API types

* chore: Convert Chainable into a Generic with a subject

* chore: undefined return of then keeps Subject

* fix: Remove incorrect comment

* chore: Add element keys to all selector methods

* chore: Remove generic from cy.not - it doesn't make sense

* chore: Add ChainableArray for array Subjects

* chore: Add ChainerArray to thread types through

* chore: Remove ChainableArray interface

* chore: Fix stub/spy types - returns Agent interface
2017-12-11 21:45:39 -05:00
Nicholas Boll 6db7a83125 chore: Add dtslint and Cypress static types (#1044)
* chore: Add dtslint and Cypress static types

* chore: Fix types location for cli build

* chore: Removed api from api command paths

* chore: Remove semicolons from type definitions

* chore: Removed semicolons not caught by tslint

* chore: Add type tests
2017-12-08 16:41:34 -05:00
Vincent Timofti 532cf38208 Typings: fix Cypress interface (#1010) 2017-12-05 11:55:57 -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 da374e39e4 document failOnStatusCode for cy.visit 2017-12-04 16:59:32 -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
Gleb Bahmutov 8e21f87526 Add platform arch 824 (#986)
* add platform and arch to configuration object for #824

* pass platform and arch from config

* test Cypress.platform and Cypress.arch

* add TypeScript definitions for platform and arch
2017-11-30 15:30:18 -05:00
Gleb Bahmutov 1b89e31526 Include typescript definitions 856 (#979)
* start including Cypress TypeScript definitions in CLI for #856

* document cy.type and cy.focused

* document cy.document and Loggable

* document cy.window()

* document cy.trigger methods

* document more interfaces

* document Cypress object

* cli: use existing build script for copying typescript definitions
2017-11-30 14:44:40 -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 2532c65be0 cli: tests for os conditional stdio 2017-10-10 08:09:26 -04: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 3d9b664e16 Merge pull request #524 from cypress-io/develop
bring latest commits from develop to windows branch
2017-09-28 12:40:20 -04:00
Gleb Bahmutov 94b1d11856 Bring back commits (#522)
* add run serially console message

* linting

* root: add npm run all prune command (#513)

* build and install binary and NPM package locally on Circle

* pass env variable differently

* remove console.log from launcher

* listr delay

* longer listr delay in tests
2017-09-28 11:59:44 -04:00
Gleb Bahmutov 907254b2ac cli: fix unit test for windows 2017-09-27 15:01:01 -04:00
Gleb Bahmutov 2a093afdf8 win: zip and unzip 2017-09-27 11:08:07 -07:00
Gleb Bahmutov 25e871d4d9 latest develop -> win-binary-495 (#512)
* server: WIP snapshots

* server: add snapshots for e2e tests

* runner: fix lint task

* eslint fixes

* use cypress eslint plugin

* add eslintrc for scripts

* launcher: add eslintrc

* docs: add eslintrc

* exclude bower_components from linting

* docs: rework callback function example for should() and and() command

* docs: updated roadmap, added many new issues

* docs: reference new issues in roadmap

* docs: added 0.20.0 summary, issues that need to be opened

* docs: clarify on CLI changes, all misc other improvements

* docs: bump hexo [skip ci]

* docs: fix typo #616

* bump hexo dep

* docs: fixed some incorrect links.

* docs: deployed to production [skip ci]

* docs: get hexo to escape html properly

* docs: use sync render [skip ci]

* scripts: use path separator for label, close #501 (#502)

* desktop-gui: guard against record keys being set to null

* desktop-gui: add test for record keys being null

* launcher: detect chrome on windows (#504)

close #504 

* launcher: detect chrome on windows

checks if file exists, then determines version using `wmic`

close #503

* launcher: detect canary and chromium

plus update types to latest

* add launcher as a CI job

* run launcher on Windows CI

* forgot to restore monorepo

* go back on Win CI

* Merge from master (#508)

* server: WIP snapshots

* server: add snapshots for e2e tests

* runner: fix lint task

* eslint fixes

* use cypress eslint plugin

* add eslintrc for scripts

* launcher: add eslintrc

* docs: add eslintrc

* exclude bower_components from linting

* docs: rework callback function example for should() and and() command

* docs: updated roadmap, added many new issues

* docs: reference new issues in roadmap

* docs: added 0.20.0 summary, issues that need to be opened

* docs: clarify on CLI changes, all misc other improvements

* docs: bump hexo [skip ci]

* docs: fix typo #616

* bump hexo dep

* docs: fixed some incorrect links.

* docs: deployed to production [skip ci]

* docs: get hexo to escape html properly

* docs: use sync render [skip ci]

* Use npm@5 to install on Windows (#509)

* cli: extend test delay to avoid listr animation

* run linter an all

* update contributing docs (#511)

* update contributing docs

* add notes on linting, branching and testing

* two CI branches, one for develop one for master
2017-09-26 16:09:26 -04:00
Gleb Bahmutov 7d46fcde06 cli: extend test delay to avoid listr animation 2017-09-26 15:19:30 -04:00
Gleb Bahmutov a0c08bbdf3 Windows support (#484)
* try installing on Windows

* Handle windows setup

- no browser detection on windows yet, just placeholder code
- symlink types

* add appveyor file

* add appveyor windows build

* use execa to run server unit tests

* run server unit tests on appveyor

* ignore root install errors

* upgrade rebuild-node-sass

and work on Json unit test that fails on Windows

* print npm version

before installing, commented out caching node modules in the root

* a few small tweaks for windows support

* fix bin-up in launcher project

use bin-up@1.1.0 for windows support, close #491

* cli: build script on Windows, close #492

* cli: build errors are fatal

* use cross-env in extension

Fixes environment variables on Windows in #490

* extension: fix 3 tests on Windows

1 more broken test remaining

* extension: use EOL before comparing text

* example: update test for Windows

* example: replace build.sh with build.js

Close #488

* remove trailing whitespace

* cli: build script again

* server: work on unit tests for windows

* binary: add windows as build platform

* windows: try building binary

started work on building on CI for windows
2017-09-25 10:17:28 -04:00
Brian Mann fa8551793b fixes #661, accept --project for cypress open 2017-09-19 11:52:44 -04:00