Commit Graph

1912 Commits

Author SHA1 Message Date
renovate[bot] c48dd1542f fix(deps): update dependency method-override to version .x 🌟 (#4209)
* fix(deps): update method-override to 3.0.0 🌟

* remove unused method-override devDep from driver

* oh, where is my mind, I got these backwards. Remove from server - leave in driver 😑


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-05-17 12:13:39 +06:30
renovate[bot] 76cb0efe52 fix(deps): update dependency getos to version .x 🌟 (#4222)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-17 12:05:47 +06:30
renovate[bot] dc2718d2f7 fix(deps): update dependency semver to version .x 🌟 (#4207)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-16 14:17:40 +06:30
renovate[bot] 3aec800050 fix(deps): update pluralize to 7.0.0 🌟 (#4206) 2019-05-16 13:15:38 +06:30
renovate[bot] d55d3e5382 fix(deps): Update dependency pluralize to version .x 🌟 (#4205)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-16 12:08:00 +06:30
Jennifer Shehane e3105fa17f Update Cypress.log to throw when not provided an obj + handle being called outside of command (#4159)
* Update Cypress.log to throw when not provided an object as its argument

* Add failing e2e test for Cypress.log being used without a cy command

* Write code to handle situation when log is run outside of a command

- add snapshot for passing situation

* have options be obj by default

* Replace end to end test with unit integration test

* Fix issue where if Cypress.Log is not passed a name, then the Command component wouldn't render

* remove excess whitespace
2019-05-16 11:18:40 +06:30
calvinballing 181c3624c5 Fix typos in selector-playground.spec.jsx ("Oop" > "Oops") (#4201)
* Clarifies error when focused element not found

Fixes #851 -> Updates Error Message for Clarity when unable to find a focused element

* Revert change to error message

* Fix typos ("Oop" > "Oops")
2019-05-16 11:17:43 +06:30
Zach Bloomquist 432b5366d9 Expose cy.isCy as Cypress.isCy, add typedefs (#4170)
* expose cy.isCy on Cypress object

* add typedefs for Cypress.isCy

* :face_palm:
2019-05-16 11:10:58 +06:30
renovate[bot] b8c3b3d42f chore(deps): update dependency ts-node to version .x 🌟 (major) (#4197)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-16 10:29:13 +06:30
Zach Bloomquist c3759d5213 Escape paths passed by --browser (#4011)
* add failing test

* launcher: escape path to browser in getVersionString

* fix test

* Use execa.stdout so we can just pass the path as-is, no escaping
2019-05-15 12:52:18 -04:00
Zach Bloomquist b8a6baaca3 Retry certain requests on failure (#4015)
* retry requests, basic e2e test

* basic e2e test for chrome behavior

* don't use timeouts to test

* some minor cleanup

* validate google chrome's retry behavior w/ a proxy

* get retries on network errors workin

* cleanup

* final changes before switching approach

* Reverting previous approach in request.coffee, server.coffee

* add retryOnNetworkFailure

* now works with retryOnStatusCodeFailure

* retry 4 times in addition to the 1 initial attempt

* add tests for subresources

* much improved error handling

* have the e2e test really work

* e2e baseurl check

* retry baseurl check

* remove special handling for node 8.2.1 bug

* WIP: continue making progress building out request retry

- swap out passthrough’s for pumpify / duplexify / pump
- clean up error handling / messaging / retry logic

* pipe clientrequest events

* buffer req body to disk, restore error handling/retrying

* don't bubble up errors from failed attempts

* actually pipe reqstream, oops

* add some e2e tests for request body

* revert lib/request.coffee to 7be1051

* add almost-working lazy-stream

* manually fire the 'pipe' event on the reqStream to copy headers to the outgoing message

- restore the ‘error’ propagation so that all tests pass for now

* cleanup leaking 'undefined' into stdout, causing failing e2e tests

- do not set onWarning as a property of project, just pass as an
argument

* add new options to request_spec, deduplicate default opts

* use stream buffer in request.coffee

* revert request.coffee

* last stream_buffer changes before removing fs stuff

* remove fs stuff from stream_buffer, add stream piping tests

* it works! :tada::tada:🎉 using duplexify to separate delayStream and reqBodyBuffer

* retry for .5s max on ECONNREFUSED

* add error codes

* don't timeout proxied requests

* restore baseurl check

* update new e2e tests

* make delay work with rp

* propagate clientresponse events

* removing tests that don't do anything now that we don't ESOCKETTIMEOUT on proxied requests

* add new visit, req options to index.d.ts

* don't fail on server-performance-test

* make retries with status code work again

* account for different stack trace in ci

* fix test

* retry https requests

* add tests for https passthru retries working

* clean up error handling for https-proxy

* fix failing https-proxy tests, tweak agent error handling to prevent multiple callbacks

* make expectedExitCode actual vs. expected in the correct order

* bump up e2e test timeout so it can retry and still work

* update tests

* retry up to 500ms on proxied requests

* add tests for incompatible options errors

* remove .only

* maybe this will help it act more consistently

* help e2e test work in ci

* don't reconnect on already made connections

* clarify naming

* wip: testing https proxy

* better debug calls

* WIP: getting proxy passthrough retry tests going

* handle retrying upstream proxy errors

- add tests for successfully retrying proxy errors and for unsuccessful
retries
- fix onClose errors when proxy connection is closed before enough data
is received
- fix not returning setTimeout correctly

* group related code accordingly

* do not build typescript by default, drop extension from main

* more TODO notes

* don't set a default NO_PROXY if NO_PROXY = ''

* debugging-proxy@2.0.0

* null out reqBodyBuffer when req finishes

* wip: retry in agent, not https-proxy [skip-ci]

* update https-proxy to use @packages/network retries

* retry after connection but before proxy tunnel established

* appease my linty overlords

* update https-proxy tests

* update agent specs, decided to still use tls.connect

it's easier to test and has less complexity

* test retrying HTTPS passthru

* debugging-proxy@2.0.1

* increase defaultCommandTimeout 100 -> 200 to prevent flake in CI

* auto formatting

* fix test to be dynamic and not rely on magic constants

* copy types field when linking proxy images, update packages/network types field

* linting

* add network index.js file

* linting

* improve error messaging experience when verifying base url

* only insert 1 new line

* fix failing test not binding to localhost

* removed test that's covered by e2e specs

* remove dash in 're-try'

* some cleanup for readability

* use allocUnsafe per perf

* unset NO_PROXY with an empty string

* move retry ensuring the baseUrl into url, cleanup some imperative code

* if the head is already present during connect, make connection, else wait for first head bytes

* minor formatting, clarity around conditions, naming

* rename retryInterval -> retryIntervals

* set defaults for requests during creation for clarity

* rename send -> sendPromise to pair better with sendStream

* use retryIntervals instead of juggling MAX_REQUEST_RETRIES

- ensure debug messages are consistent between request streams +
promises
- set static constants

* DRY up status check + network failure + retry logic

- keeps the debug logic identical between promises + streams
- ensures all logic paths are also consistent
- consolidates the pop’ing of intervals in a single place

* find / replace fail

* derp

* make the logic actually correct, set intervals as cloned defaults for recursive lookup

* pass arg correctly

* reduce debugging noise, formatting

* rename intervals -> delaysRemaining for clarity

* added unit tests around getDelayForRetry

* set retryIntervals as default options correctly, add unit tests


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2019-05-15 12:46:55 -04:00
Gleb Bahmutov b21918921b move close too quick check into CLI (#4186) 2019-05-13 17:08:33 -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
Zach Bloomquist 1b1c2f24bd Add typedefs for Cypress.LocalStorage.clear (#4168)
* add typedefs for LocalStorage.clear

* clean up unused arguments

* appease the linter
2019-05-13 16:58:20 +06:30
renovate[bot] bf1a942944 chore(deps): update dependency supertest to version .x 🌟 (#4154)
* chore(deps): update supertest to 4.0.2 🌟

* remove deprecated 'supertest-as-promised' + update supertest-session

* fix linting error


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-05-08 15:16:33 +06:30
renovate[bot] 9ce129c641 fix(deps): update dependency electron-packager to version .x 🌟 (#4155)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-08 15:05:54 +06:30
Paul Edwin f34471ca0a address #3069 by using chokidar fs events (#4038)
* address #3069 by using chokidar fs events

* use chokidar directly for watching specs and add tests

the watchers lib watches for file contents changing and doesn’t watch for files being added or removed
2019-05-07 16:00:12 -04:00
Jennifer Shehane 6d5963b9ca remove unused devDep and dep "clear-module" (#4153) 2019-05-07 16:57:26 +06:30
renovate[bot] 1761ba05da fix(deps): update dependency data-uri-to-buffer to version .x 🌟 (#4152)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-07 16:26:54 +06:30
renovate[bot] 0ca9d2a5f6 fix(deps): update dependency supports-color to version .x 🌟 (#4150)
* fix(deps): update supports-color to 6.1.0 🌟

* bump cli down to 5.5.0 to continue support for Node 4


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-05-07 16:23:51 +06:30
renovate[bot] a90bc3a3e5 chore(deps): update dependency snap-shot-it to version .x 🌟 (#4151)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-07 16:21:22 +06:30
Jennifer Shehane a31a15ff38 Remove unused dep "tar-fs" (#4149) 2019-05-07 15:15:34 +06:30
renovate[bot] 2565e6e96c fix(deps): update dependency term-size to version .x 🌟 (#4148)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-07 14:14:08 +06:30
renovate[bot] a97cfc381a fix(deps): update trash to 5.2.0 🌟 (#4140) 2019-05-06 16:28:05 +06:30
renovate[bot] 83674c8acc fix(deps): update dependency widest-line to version .x 🌟 (#4139)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-06 16:19:18 +06:30
Jennifer Shehane 3c0b01c90b remove unused package - codecov (#4136) 2019-05-06 14:43:10 +06:30
renovate[bot] cb44f0facc chore(deps): update dependency wait-on to version .x 🌟 (#4135)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-06 14:15:04 +06:30
renovate[bot] 71e0124638 fix(deps): update dependency send to version 0.17.0 🌟 (#4134)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-06 12:43:39 +06:30
renovate[bot] 33a9ab35a1 chore(deps): update dependency proxyquire to version .x 🌟 (#4115)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-03 18:58:09 +06:30
renovate[bot] 6e13bbecaf fix(deps): update dependency semver to version 5.7.0 🌟 (#4112)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-03 18:01:58 +06:30
renovate[bot] 98994d4e3e fix(deps): update dependency jimp to version 0.6.4 🌟 (#4097)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-03 12:02:58 +06:30
renovate[bot] f662e48652 fix(deps): update dependency url-parse to version 1.4.7 🌟 (#4110)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-03 11:53:01 +06:30
renovate[bot] 3394ea990a fix(deps): update dependency image-size to version 0.7.4 🌟 (#4096)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-03 10:21:05 +06:30
Gleb Bahmutov 28c75d0bcc upgrade kitchensink to get rid of http-server dependency (#4107) 2019-05-02 17:04:33 -04:00
Jennifer Shehane 0cc949308d handle cy.contains selector with comma separated dom els (#4077)
* split filter arg on commas and generate 'contains' selector using all els

- write test with comma-separated dom els in filter arg.

* wrote extra test to ensure space + comma separated filters still find correct results.

* trim whitespace around filters in contains

- we don’t want to strip more than this since whitespace changes the
meaning of selectors. Only trim leading and trailing space.

* fix click test error to find 17 els instead of 15 (since 2 were added)

* move newly added button in DOM below previous first button

- also just update the failing test to use more specific #button id
instead of button:first


Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2019-05-01 21:27:02 -04:00
Abdullah Uzun bf4ac8179d Overriding user-agent when using cy.request or cy.visit (#3920)
* Overriding user-agent when using cy.request

* add driver tests for visit, request user-agent
2019-05-01 16:14:47 -04:00
Gleb Bahmutov b96066a396 chore: linting example spec files 2019-05-01 10:18:33 -04:00
Gleb Bahmutov da23a9760a detect forked PR on AppVeyor CI, close #4063 (#4078)
* detect forked PR on AppVeyor CI, close #4063

* match what CircleCI has for env variables
2019-05-01 09:38:38 -04:00
renovate[bot] 57eda8cacf fix(deps): update dependency debug to version .x 🌟 (#3793)
* fix(deps): update debug to 4.1.1 🌟

* bump cli 'debug' down to 3.2.6 - last version that still supports Node 4


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-05-01 13:12:07 +06:30
renovate[bot] ea1b2a10a1 fix(deps): update dependency find-process to version 1.4.1 🌟 (#4087)
* fix(deps): update find-process to 1.4.1 🌟

* Remove 'isFinite' check as this is done by default in 'find-process' dep

- See this change:
https://github.com/yibn2008/find-process/compare/1.2.2...1.2.3#diff-d460
8a571ae373e4877cb099c7a44b57R127
- some auto-linting updates


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-05-01 11:57:30 +06:30
renovate[bot] 3149b11362 fix(deps): update dependency express-handlebars to version 3.0.2 🌟 (#4086)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-01 10:36:05 +06:30
renovate[bot] db0a65ee7f chore(deps): update dependency react to version 16.8.6 🌟 (#3954)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-05-01 10:16:48 +06:30
renovate[bot] 06fa095961 chore(deps): update dependency cypress-example-kitchensink to version 1.5.2 🌟 (#4079)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-05-01 09:11:10 +06:30
renovate[bot] 4fd0f64aab fix(deps): update dependency execa to version 0.11.0 🌟 (#4076)
* fix(deps): update execa to 0.11.0 🌟

* bump execa versions to 1.0.0 (actually no changes from 0.11.0 - just stable release)

* bump execa down for cli, execa 0.11.0 drops support for < Node 6


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-04-30 20:45:46 +06:30
renovate[bot] 167934f0e4 chore(deps): Update dependency inquirer to version 3.3.0 🌟 (#4071)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-04-30 16:36:38 +06:30
renovate[bot] 9372bc3f67 chore(deps): update dependency gulp-rev-all to version 0.9.8 🌟 (#4061)
* chore(deps): update gulp-rev-all to 0.9.8 🌟

* update rev-all usage to match new 0.9 API


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-04-30 15:56:55 +06:30
renovate[bot] 455046b928 chore(deps): update dependency express-session to version 1.16.1 🌟 (#4060)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-04-30 15:38:13 +06:30
Gleb Bahmutov 5015cbbe87 Wrap konfig load from scripts tests to avoid changing CWD (#4067)
* chore: add utility method to get konfig from scripts tests

Local scripts specs should be be caught by the changing current
directory when loading `konfig.coffee` (which loads `cwd.coffee`,
which changes the cwd to `packages/server`). This was throwing
snapshot tests into saving into a wrong folder until I have noticed
this and fixed in
[v8.0.3](https://github.com/bahmutov/snap-shot-core/releases/tag/v8.0.3)

* linting

* add more comments
2019-04-29 17:14:38 -04:00
renovate[bot] c7f4feae26 chore(deps): update dependency enzyme-adapter-react-16 to version 1.12.1 🌟 (#4059)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-04-29 21:57:58 +06:30
renovate[bot] 056f5f5c89 chore(deps): update dependency @babel/core to version 7.4.4 🌟 (#4056)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-04-29 17:55:52 +06:30