Commit Graph

11086 Commits

Author SHA1 Message Date
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
Thomas Broadley d503ce2004 docs: fix typo (#1116) [skip ci] 2017-12-21 11:01:07 -05:00
Gleb Bahmutov d865439367 add cypress.schema.json close #1109 (#1112) 2017-12-20 21:02:01 -05:00
Jennifer Shehane 24fd6a76eb Fix broken link to Roadmap [skip ci] 2017-12-20 10:15:43 -05:00
Brian Mann fa584e6045 release 1.4.0 [skip ci] v1.4.0 2017-12-19 15:49:31 -05:00
Jennifer Shehane 2435992328 example: bump kitchen-sink to 0.8.3 (cy.exec w/ platform updates) (#1095) 2017-12-19 13:40:55 -05:00
Brian Mann 88c367ff13 server: fixes #1093, ensure github login works (#1094)
* server: fixes #1093, ensure github login works

- add more comprehensive tests around windows and events
- test that github callbacks work as expected

* server: fixes failing tests

* server: fixes failing tests, more resets
2017-12-19 12:54:35 -05:00
Marcelo Emanoel Bezerra Diniz f0d67572ea Add a local filter for specs by displayName (#1033)
* Add a local search for specs by displayName

* Fix filter spec tests

* fix update banner spec

* styling updates to searchbar

- make background of search bar grey
- fix issue where outline was being cut off
- more visually vertically center the search icon
- update style of ‘run all tests’ button to look like btn instead of
link
- fix styles of searchbar so that it is not fixed at top (removes needs
to click({force: true})
- cleaned up a few cy chains in tests.

* Update search area to be less prominent.

- Change ‘search here’ to ‘search…’
- Made search bar smaller
- made search bar same bg color as header
- underline on focus
2017-12-19 12:44:40 -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
Brian Mann 4453fcf920 release 1.3.0 [skip ci] v1.3.0 2017-12-19 10:52:53 -05:00
Chris Breiding 874ae86bec Fix selector playground styles in electron (#1088)
* runner: append selector playground styles instead of using a link tag

* runner: rename selector helper to selector playground

* runner: bump react-tooltip version
2017-12-19 10:41:11 -05:00
Brian Mann 150edb614a rerun in ci 2017-12-17 18:26:25 -05:00
Brian Mann 191dbfb354 server: fixes #691, add event for exposing browser launch args (#1078)
* server: fixes #691, add event for exposing browser launch args

- enable special handling of ‘—load-extension’
- add e2e / integration / unit tests
- handle both chrome + electron cases

* server: iterate on failing tests, don't strip electron options else we lose valuable properties

- add better debugging

* server: fix failing tests, browsers needed

* server: send in a complete browser object for 'before:browser:launch'

- useful for doing conditional things with version and/or path
2017-12-17 16:57:26 -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
Gleb Bahmutov a559801eb2 ci: pass commit into commit message to test projects (#1076)
* ci: pass commit into commit message to test projects

* build: remove this branch from testing binary
2017-12-15 15:34:31 -05:00
Brian Mann e0da78ee66 release 1.2.0 [skip ci] v1.2.0 2017-12-15 01:39:55 -05:00
Brian Mann d4e293a377 deploy notes [skip ci] 2017-12-14 23:51:08 -05:00
Brian Mann 1fbfcd6087 Issue 442 - blacklisting hosts with config.json (#1062)
* erver: fixes #442 implements blacklisting hosts with config

* server: add validation rules for blacklistHosts

* server: fix bad cherrypick / merge for WIP feature

* server: enable passing exit false to prevent browser teardown on completed runs

* server: add e2e tests for blacklists, fix edge case where blacklisted localhost was causing ws connection issues

* server: add snapshot for blacklist e2e test
2017-12-14 21:38:57 -05:00
Nicholas Boll a06ca4a19b chore: Add extra chainer types for auto-complete (#1059) 2017-12-14 16:47:39 -05:00
Gleb Bahmutov e3e1a5fe15 build: make empty commit in next version branch first, close #1070 (#1071)
* build: make empty commit in next version branch first, close #1070

* build: add branch name = version to commit message
2017-12-14 14:49:15 -05:00
Brian Mann 26873b60f2 server: add validation rules for userAgent 2017-12-13 00:17:18 -05:00
Brian Mann 9ab2855337 fixes #364 enable user agent to be changed in cypress.json (#1060)
* fixes #364 enable user agent to be changed in cypress.json

* server: fixes failing tests
2017-12-12 19:35:27 -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
Brian Mann c1bcb2f641 Issue 1042 (#1057)
* server: remove unused file

* server: WIP, start implementing accepting plugin returning promise and yielding config overrides [skip ci]

* server: cleanup the env + environentVariables disaster. simplify and only use 'env'

* server, desktop-gum: rename 'env' to 'cypressEnv' to avoid conflicts, fix failing tests

* server: modify plugins error content to be clearer

* runner, driver: more environmentVariables -> env cleanup

* fixes #509 return the complete configuration object to Cypress.config()

* fixes #1042 enable plugins to return a promise and modify config

* desktop-gui: add 'plugin' override to configuration display

* server: bug fix when plugin cause a project not to open

* desktop-gui: fix for failing e2e test

* server: make errors clearer when plugins crash

* server: fix bug with PLUGINS_FUNCTION_ERROR not sending right arguments

- fix failing tests
- improve plugin error content

* server: fix failing snapshots, preprocessor is invoked for support + spec files

* server: fix tests, don't watch the support file initially

- this was causing a problem where unhandled preprocessor errors were
causing the entire process to hang.
- this was happening because we weren’t properly running support files
through a custom preprocessor initially

* fixes failing tests
2017-12-11 20:53:23 -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
Graham McGregor 4d41d3d641 De-emphasize a word in error message (#1038)
This is to change the tone/inflection of the message. The previous
message felt like it was bordering on aggressive.
2017-12-07 17:10:16 -05:00
Jennifer Shehane 26de281aa9 Fixing toc + editing [skip ci] 2017-12-07 11:31:20 -05:00
Jennifer Shehane 1aef239974 Add image of desktop | few minor edits [skip ci] 2017-12-07 11:16:10 -05:00
Jennifer Shehane d29493d686 Include better testing instructions. [skip ci] 2017-12-07 11:11:35 -05:00
Brian Mann 72ea33b1f7 release 1.1.4 [skip ci] v1.1.4 2017-12-06 22:00:18 -05:00
Brian Mann 1c31b225d8 kickoff ci 2017-12-06 21:24:27 -05:00
Brian Mann 2e9fe69e30 Issue 1020 1021 (#1028)
* release 1.0.3 [skip ci]

* use chrome62 docker image

* server: fixes #1020 and #1021 - disable gnu and add no sandbox when in linux and launching chrome
2017-12-06 20:46:30 -05:00
Brian Mann 5de8602f38 use chrome62 docker image 2017-12-06 17:41:18 -05:00
Chris Breiding f786bcf6c0 server: upgrade browserify-preprocessor to 1.0.2 (#1019) 2017-12-06 16:50:40 -05:00
Gleb Bahmutov d3ab6a83a5 Remove browser aliases 1023 (#1024)
* launcher: remove aliases, close #1023

* upgrade tslint / typescript and fix types
2017-12-06 16:26:44 -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
Brian Mann 5c557757b1 release 1.1.3 [skip ci] v1.1.3 2017-12-04 01:50:02 -05:00
Brian Mann dc37dff548 server: (WIP) properly pass in browserName + version to API when creating instances (#1000)
* server: (WIP) properly pass in browserName + version to API when creating instances

* server: fixes #854 and failing tests

* server: fix using wrong property on found browser
2017-12-04 00:43:44 -05:00
Brian Mann a25b828675 driver: provide additional context when uncaught errors originate either from spec code or app code (#999)
* driver: provide additional context when uncaught errors originate either from spec code or app code

* server: fix failing snapshots for uncaught exceptions in spec + test code
2017-12-04 00:01:14 -05:00
Jamie 875e378930 feature: Update cy.visit to allow for visiting non-2xx response pages when option set (#982)
* Update requestUrl method to accept options param

* Update requestUrl to only throw error when failOnStatusCode option is true

* Set the default option value for failOnStatusCode to true

* Pass options to requestUrl call

* Update _onResolveUrl to take an options param

* Update _onResolveUrl to set domain for invalid status codes when visitable

* Update socket delegator to pass options arg to onResolveUrl

* Add server test case for new functionality around resolving non-2xx responses

* Add new driver test routes

* Add driver pkg test case for visiting non-2xx pages

* Add error test for edge case when non-2xx and non html response

* driver: normalize error messages by reducing 2 or more new lines into only 2 new lines

* driver: make test server routes clearer, remove unused route

* driver: simplify accepting bad status codes logic

- keep the isOkStatusCode logic in the server only, instead of also
putting it in the driver
- update the tests accordingly
- remove test that was unnecessary

* driver: add error message for explaining how to test bad status codes

* server: fix failing snapshot tests due to error message changes new line normalization
2017-12-03 17:10:49 -05:00
Brian Mann 8033fbf819 Issue 995 (#996)
* better explain contributing to the driver

- update npm tasks to reflect newest conventions

* better explain contributing to the desktop-gui

- update npm tasks to reflect newest conventions

* synchronize content changes

* capitalize all package readme's for consistency

* better explain contributing to the runner, synchronize content changes

* better explain contributing to the server

* synchronize content

* synchronize content

* synchronize content

* synchronize content

* synchronize content

* synchronize content

* better contribution guidelines by redirecting users to package specific readme's

* synchronize content

* fix various content mistakes

* simplify contributing

* removed dead files

* bump zunder

* lock zunder to 5.1.0
2017-12-02 18:51:42 -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
Gleb Bahmutov f8d8670763 server: parse JSON with unicode escape, close #964 (#965) 2017-11-29 16:21:20 -05:00