Commit Graph

1991 Commits

Author SHA1 Message Date
renovate[bot] ca451f4155 chore(deps): Update dependency @cypress/bumpercar to version 2.… (#4597)
* chore(deps): Update @cypress/bumpercar to 2.0.9 🌟

* remove react-tooltip upgrade from this PR

* Have tooltip have default empty string to avoid 'title requirement' warning in console


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-06-28 19:49:23 +06:30
Brian Mann 17520bd4b2 remove dead code [skip ci] 2019-06-27 17:09:18 -04:00
Zach Bloomquist f74d103a60 Warn on createRun warning from dashboard if warning code is unk… (#4567)
* Warn on createRun if warning code is unknown

* add response validation in 7_record_spec

* add unknown warning fallback test

* update existing tests to match schemas
2019-06-27 15:40:22 -04:00
renovate[bot] e1f58da01c fix(deps): update dependency fs-extra to version .x 🌟 (#4581)
* fix(deps): update fs-extra to 8.0.1 🌟

* but fs-extra in cli package back to 5.0.0 (Needs Node 4 support)


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-06-27 14:04:43 +06:30
Zach Bloomquist 23d66fd5ea Use 'path' for key in browsers dropdown, fix desktop-gui duplicate key warning (#4562) 2019-06-26 17:05:09 +06:30
renovate[bot] b6345521d1 fix(deps): update dependency fs-extra to version .x 🌟 (#4571)
* fix(deps): update fs-extra to 7.0.1 🌟

* bump fs-extra down to 5.0.0 for cli (Needs Node 4 support)


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-06-26 15:33:35 +06:30
renovate[bot] 55b86d4595 fix(deps): update dependency fs-extra to version .x 🌟 (#4559)
* fix(deps): update fs-extra to 6.0.1 🌟

* Downgrade cli fs-extra back down to 5.0.0 - 6.0.0 drops Node 4 support


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-06-26 13:44:09 +06:30
Jennifer Shehane ce156e283d 4429- Do not log 'counts' for aliases that are non-routes (#4556)
* Do not log 'counts' for aliases that are non-routes

- Update styling of alias counts to be more centered
- Write tests for non-route aliases to display in runner

* Replace enzyme alias tests with Cypress tests
2019-06-26 12:44:00 +06:30
renovate[bot] c2d9ae4e42 fix(deps): update dependency fs-extra to version .x 🌟 (#4555)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-25 17:20:04 +06:30
Zach Bloomquist 670c8a01c9 reporter: Cache aliasesWithDuplicates to prevent unnecessary re… (#4552)
* reporter: cache aliasesWithDuplicates to prevent unnecessary re-renders

* add link to issue on test
2019-06-24 18:07:17 -04:00
Zach Bloomquist defbdc4423 Adjust 6_visit_spec fast_visit_spec to not flake on potential o… (#4539)
* compare to 99%, not 100%, to avoid outliers

* 'format on save' strikes again

* try out new times
2019-06-24 17:41:34 -04:00
Jennifer Shehane 74484b22a4 Runs list usage warning (#4531)
* Remove unnecessary instructions for desktop gui testing

* Add timezone env var to ensure desktop-gui testing passes

* Add parallelization disabled warning tooltip

- Update the few to match new logic written from Dashboard.

* fix failing specs

* add unit tests for stripSharedDirs method
2019-06-24 15:36:24 +06:30
Jennifer Shehane c2861ba557 update winston to v2 (#4538) 2019-06-21 15:06:17 +06:30
Zach Bloomquist 989f516556 Use percentiles to make proxy performance test not flaky (#4507)
* allow perf tests to fail CI

* use percentiles to make proxy-perf less flaky, reenable https tests, clean up table output

* newline

* retry performance test, lower timeout
2019-06-20 14:47:29 -04:00
renovate[bot] c7b340a661 fix(deps): update dependency winston to version .x 🌟 (#4528)
* fix(deps): update winston to 1.1.2 🌟

* remove instances where winston is required but not used.


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-06-20 15:59:00 +06:30
Chris Breiding 448de97b9d set min width for reporter contents (#4505) 2019-06-19 11:07:17 -04:00
renovate[bot] 195d757a6a fix(deps): Update dependency electron-positioner to version .x 🌟 (#4502)
* fix(deps): Update electron-positioner to 4.1.0 🌟

* remove electron-positioner dep - this is not used anywhere...


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-06-19 20:52:23 +06:30
Zach Bloomquist 74573996ff Allow users to opt out of exception reporting with CYPRESS_CRASH_REPORTS=0 (#4431)
* Allow users to disable exception reporting with CYPRESS_EXCEPTION_REPORTING=0

* rename to CYPRESS_CRASH_REPORTS, do not merge into env

* rename createRaygunException -> createCrashReport

* add projectId to default config keys so it shows up resolved project settings

-

* only suppress CYPRESS_ENV from showing up as an env var, allow CYPRESS_CRASH_REPORTS to be displayed

* make config keys a clear constant, formatting, cleanup

* truncate special env vars and debug logs

* only set authToken if truthy

* removed unused require


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-06-19 06:55:11 -04:00
andrew mcmechan 1f095c5ea9 Wrap tests titles in reporter UI (#4428)
* break title onto new line and show inline

* keep spinner to single line

* keep section header text inline after line break
2019-06-19 17:13:52 +06:30
Zach Bloomquist 74dc6e8b5e Only send cy.visit() auth options to correct protection space (#4338)
* only send auth headers to the original protection space

* cleanup

* test now fails w/o fix

* note about moving this into lib/util/uri.js

* refactor, cleanup, and provide more context

* add lots of tests around cors.urlMatchesOriginProtectionSpace

- fix some edge cases and yes… bugs due to behavior of url.format(…)
- if host is set, port value is ignored, so we must clear it out
- protocol contains a ‘:’ character, fixed the protocol + port constants
- synchronize method signatures to always return a safely cloned
url.parse(…) object
- add url notes

* have buffers use url utility

* fixes failing tests

* remove unused require


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-06-19 06:23:25 -04:00
Brian Mann 83858e89c0 display the histogram before making assertions - else they'll fail and the console task will not run 2019-06-19 06:21:15 -04:00
renovate[bot] d01c4f0715 chore(deps): Update dependency snap-shot-it to version 7.7.1 🌟 (#4498)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-19 15:08:24 +06:30
Jennifer Shehane e2205f9263 Address some visibility issues (#4421)
* Add failing test case for visible element within overflow hidden then position absolute element.

Addresses #4395

* Write failing test case for when parent is flex and overflow hidden with el outside bounds

Addresses #4161

* Wrote failing test for visibility outside of clip-path

Addresses #1178

* Add failing tests for transform scale

Addresses https://github.com/cypress-io/cypress/issues/723

* Add failing test for backfact-visibility hidden example

* cs -> js fixes

* Add more specific error when el is not element

* Always return as visible when checking html or body

* Add comments + rename methods to be more exact

* Add case for isHidden when visibility is collapse

* Add failing test cases for visibility issues

* Add comment about how ensureVisibility works under the hood

* Add checks and tests for opacity: 0 to be hidden

* Simplify if/case statements to be more readable

* Expand check for offset parents to also check children of ancestor for positioning attributes

close #4395
close #755

* Fix issue where els with parents with absolute position inside overflow hidden would be calculated as not visible

* comment out opacity checks for patch release

* Add more tests around new visibility assertions

- Add case to make sure display none is not on the option or optgroup
itself

* Fix failing assertion - where el was undefined when looking for visibiliyt

* remove commented out code involving opacity 😬
2019-06-19 14:51:33 +06:30
Zach Bloomquist 60318a7f0f Use is-html as a fallback to check if cy.visit() response is HTML (#4321)
* use is-html as a fallback to check if response is HTML

* end response with passthru stream

* clean up network_failures

* add test that visit passes with undef content-type

* handle empty responses too

* try to fix dtslint: bump package version 2
02-00000876

* fix failing tests via develop merge


Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-06-19 03:05:38 -04:00
Zach Bloomquist 0c8df29def End proxied responses for 1xx, 204, 304 with no body, fix bug where cy server could be proxied (#4358)
* release 3.2.0 [skip ci]

* add failing test for 304

* always end response on 1xx, 204, or 304

* add http req spec

* add test that 1xx, 204, 304 always pass thru immediately

* cleanup

* skip stubborn test

* cleanup, tests

* fix stopping debugproxy where it hasn't been started

fix stopping debugproxy where it hasn't been started

* Never proxy websocket port

* e2e test now works

* unnecesary this

* e2e works in ci


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-06-19 00:19:30 -04:00
Zach Bloomquist f26c5a9c6f Fix flaky fast_visit_spec (#4494)
* lint plugins/index.js

* Fix flaky fast_visit_spec by using percentiles
2019-06-18 17:34:55 -04:00
renovate[bot] e81fbae9e2 fix(deps): update dependency chokidar to version .x 🌟 (#4487)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-18 14:36:06 +06:30
Zach Bloomquist 0d2ddfc263 Fix failing agent unit test (#4482) 2019-06-17 14:32:42 -04:00
Zach Bloomquist 1f185f7f11 Fix cy.visit slowness by removing Electron timers workaround (#4385)
* add tests for getAddress on localhost

* add test for visit resolving quickly

* add debug logs to network

* network: override addRequest in HttpAgent, not createSocket

* don't need to add connection: keep-alive to all responses

https://github.com/cypress-io/cypress/pull/4385#issuecomment-499103484

* test that visit finishes quickly

* do not forward connection header

* add tests to help reproduce

* cleanup

* still send keep-alive

* update tests

* remove timers

* add snapshots to e2e test

* remove tests for debugging

* try making console writes async

* Revert "remove timers"

This reverts commit b9d65a4e5c.

* allow DEBUG_COLORS to be passed in an e2e test

* try: using system node for the timers, setting up our own IPC

* Revert "try: using system node for the timers, setting up our own IPC"

This reverts commit c51b3957e2.

* put the interesting test first

* use electron-mocha to run tests in electron

* Revert "use electron-mocha to run tests in electron"

This reverts commit 8b82f0eeb3.

* support legacy addRequest invocation

* Revert "Revert "remove timers""

This reverts commit 93f15fcb17.

* update snapshot

* Revert "try making console writes async"

This reverts commit 9c8337e433.

* complete in 150ms, not 1000ms
2019-06-17 12:41:22 -04:00
Cory Danielson d2e098206c Reduce stylesheet-related memory consumption and improve performance (#4068)
* Memoize getCssRulesString by href to improve perf and memory

address #2366

* Add tests

* Move tests around in preparation for more

* Memoize makePathsAbsoluteToStylesheet as well

* Serve large dynamic css file rather than massive static file

* Update readme to be explicit about directories to run npm scripts

- This confused me each time I needed to get tests running again with the watchers

* Fix bug that causes occasional test failure

* rename spec to match issue instead of PR

* update memoization of snapshot css to account for changes by javascript

* improve snapshot css memory usage and performance

* fix linting error

* try re-ordering the tests

* add existential check to html element

* add back html file

* limit memoized caches to 50 items

* simplify generated css code

* refactor listening to css modification and before window load

* add/revise css snapshot tests

remove tests that needed manual verificaiton in favor of integration tests

* use lodash instead of Array.from

* rename function for consistency

* fix limited map first key implementation

* fix log spec


Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
2019-06-17 12:39:46 -04:00
Zach Bloomquist 2a1666d787 Better support for circular references in certain objects, fix patching of socket package (#4469)
* @cypress/what-is-circular@1.0.1

* bump socket.io-circular-parser to support circular refs in binary objs

* add repro for nested request

* use npx for patch-package since devDeps may not be available at build time

* build on appveyor

* keep patches in package

* Revert "build on appveyor"

This reverts commit e0d767250a.
2019-06-17 09:04:57 -04:00
Chris Breiding deafd99a7b Don't take snapshots when numTestsKeptInMemory is 0 (#4406)
* don't take snapshots when numTestsKeptInMemory is 0

* set non-zero numTestsKeptInMemory for driver tests
2019-06-17 08:53:18 -04:00
renovate[bot] c0a17036ba fix(deps): update dependency shell-env to version .x 🌟 (#4471)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-17 11:31:24 +06:30
renovate[bot] b18323dd75 fix(deps): update dependency shell-env to version .x 🌟 (#4467)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-16 13:00:10 +06:30
renovate[bot] 9d65e1c43e fix(deps): update dependency shell-env to version .x 🌟 (#4466)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-14 22:59:58 +06:30
renovate[bot] 86574be7ea chore(deps): update dependency snap-shot-it to version 7.5.1 🌟 (#4465)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-14 22:45:22 +06:30
Zach Bloomquist 13a03f52c3 agent: Fix NO_PROXY not respected for HTTPS urls (#4309)
* test that NO_PROXY is respected in agent

* loosen up null check in agent

* fix tests
2019-06-13 23:26:57 -04:00
Zach Bloomquist c4a0fddd5f Retry network requests on ENOTFOUND (#4459) 2019-06-13 23:25:57 -04:00
Zach Bloomquist 387ca00068 Do not watch any files in run mode (#4458)
* do not watch pluginsFile in run mode

* add integration test ensuring watchers aren't applied in run mode


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-06-13 23:24:03 -04:00
Zach Bloomquist d185a74dc9 Allow circular structures to be sent over the websocket, make it an error to send circular request bodies (#4407)
* use a parser that supports circular json

* update tests to work with new socketio version

* add error message when users supply circular body to visit/request

* show the path of the circular reference detected

* Revert "use a parser that supports circular json"

This reverts commit c052f44ec8.

* add failing driver and server tests for circular objs over websocket

* use a parser that supports circular json

* add has-binary2 patch that enables circular objects to be inspected

* update socket spec

* rejectUnauthorized: false

* use @packages/socket instead of copying client source

* prevent false positive

* use commit hash for socket.io-circular-parser

* cleanup bundling of socket.io for node + browser

- keep the interfaces identical
- browser simply has less properties than the node variant

* properly import client + circularParser from socket package

* @cypress/what-is-circular

* dont require the extension, it causes gulp to hang

* fix runner tests hanging


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-06-13 17:43:59 -04:00
Jennifer Shehane 4bd3cf2c53 Ensure that test titles are strings before sanitizing them for screenshot names (#4317)
* Ensure that test titles are strings before sanitizing them for screenshot names

* Fix linting errors

* stringify non-string title, return '' for null and undefined

* minor cleanup. extract to outer function. refactor to lodash.


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-06-12 13:14:32 -04:00
renovate[bot] 546c92e1fc fix(deps): update dependency pluralize to version .x 🌟 (#4438)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-12 11:16:52 +06:30
renovate[bot] be5909f63c fix(deps): Update dependency fs-extra to version .x 🌟 (#4437)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-12 10:50:22 +06:30
Jennifer Shehane 98cb8414d7 remove coveralls dep - not used anymore (#4138)
* remove coveralls dep - not used anymore

* remove trailing comma in package
2019-06-12 10:08:55 +06:30
Ben Kucera c0962511f0 fix incorrectly using Window.length as subject length (#4397)
* add iframe to fixtures/dom as a test
2019-06-11 15:18:54 -04:00
Ben Kucera 7efd9d8ab0 fix programmatic focus/blur events, typing into currently focused (#2982)
* fix programmatic blur events, allow typing into currently focused, fix getHostContenteditable

* intercept .blur

* reference issues in tests

* make tests account for conditional number of new lines inserted

- newer browsers insert a double new line, whereas older browsers dont
- write a helper that exposes the multiplier of new lines

* cleanup, remove dead code

* make tests dynamic when browser is or isn't out of focus

* cleanup, remove old notes, add more notes

* add failing tests for when native focus / blur are called multiple times

- need to handle not firing the events conditionally based on whether
or not the element would / should receive them

* remove old code for priming focus/blur events when window is out of focus

* remove dead code

* update focus_blur spec + add chai-subset

* decaffeinate: Rename focus_blur_spec.coffee from .coffee to .js

* decaffeinate: Convert focus_blur_spec.coffee to JS

* decaffeinate: Run post-processing cleanups on focus_blur_spec.coffee

* add failing test

* fix double blur/focus events

* make document.hasFocus always return true, add test

* fix focus events when non-focusable element

* remove unneeded retrun

* fix focusing body/ bluring active element on click

* forgot to call .get() with index

* fix focus issue with body/window

* still allow firefocus on window, skip firing focus if firstfocusable is window during click

* left out return in intercept blur/focus

* cleanup test code for focus_blur spec

* add tests to type_spec, focus_blur_spec
00-00005bfe

* update focus logic for click, fix dtslint error
06-00003d9c

* add tests for selectionchange event in focus_blur spec
01-00000dae

* set dep to exact version
06-00002320

* minor formatting

* intercept focus/blur for SVGElement

* add comment to type-into-already-focused logic


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
2019-06-11 11:06:26 -04:00
renovate[bot] 6772a02faf fix(deps): update dependency is-fork-pr to version 2.3.0 🌟 (#4330)
* fix(deps): update is-fork-pr to 2.3.0 🌟

* add 'is-fork-pr' to renovate internal group


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-06-11 14:02:23 +06:30
renovate[bot] 3f3e78408c fix(deps): update dependency fs-extra to version .x 🌟 (#4422)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-11 11:03:58 +06:30
renovate[bot] 706999d174 fix(deps): update dependency fs-extra to version .x 🌟 (#4419)
* fix(deps): update fs-extra to 2.1.2 🌟

* rename `clobber` option to `overwrite`

per https://github.com/jprichardson/node-fs-extra/pull/333/files


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-06-10 14:51:18 +06:30
renovate[bot] bc8f96b0b1 fix(deps): Update dependency fs-extra to version .x 🌟 (#4418)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2019-06-10 12:40:16 +06:30