Commit Graph

354 Commits

Author SHA1 Message Date
Chris Breiding
7cbb5d2a19 release 4.11.0 [skip ci] 2020-07-21 10:15:08 -04:00
renovate[bot]
4a3c5f17be chore(deps): update dependency pretty-ms to version .x 🌟 (#8049)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-21 14:33:30 +06:30
renovate[bot]
7663c134a6 fix(deps): update dependency plist to version .x 🌟 (#8045)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-21 12:30:44 +06:30
renovate[bot]
adff08c344 fix(deps): update dependency human-interval to version .x 🌟 (#8031)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-20 15:55:53 +06:30
renovate[bot]
c40e3ee44f chore(deps): update dependency proxyquire to version 2.1.3 🌟 (#7988)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-15 13:41:42 +06:30
Brian Mann
c72538d189 Fix lodash dupe dep (#7954)
* blow away yarn.lock

* bump lodash to 4.17.19

* reduce binary size again

* bump @types/node to correct version, fix types

* fix react + react-dom types

* add clean command for .ts conversion to .js files

* fix flaky test
2020-07-11 16:34:23 -04:00
Zach Bloomquist
d4d81dc490 release 4.10.0 [skip ci] 2020-07-07 14:05:38 -04:00
Gleb Bahmutov
4825dbb115 Update cypress-react-unit-test, run desktop-gui component tests (#7792) 2020-06-26 13:07:51 -04:00
Chris Breiding
29ca809efe release 4.9.0 [skip ci] 2020-06-23 13:31:50 -04:00
Ben Kucera
b578032fef internal: rename driver/test/cypress to driver/test (#7643)
* rename driver/test/cypress to driver/test

* use yarn workspace over lerna for individual package commands

* add error message to driver start

* remove usage of wait-on

* update <reference types/>, import string

* fix driver/readme

* fix readmes after regex replace

* revert wait-on changes

* Revert "revert wait-on changes"

This reverts commit 6de684cf34.

* update yarn.lock

* fix broken path in spec

* fix broken paths in specs with @packages/driver

* fix more broken spec paths

* move type definition loading for driver/cypress into dedicated file

* move internal-types to "types" folder, fix driver/index.d.ts

* fix type-check in packages/runner. not exactly sure why

* fix runner type-check by excluding test folder in tsconfig

* bump timeout on e2e/8_error_ui_spec

Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2020-06-11 19:11:58 -04:00
Ben Kucera
f10423051e internal: fix error on yarn add dependency command (#7668) 2020-06-10 19:26:59 -04:00
Zach Bloomquist
0e632635cd chore: rm non-test-related coffeescript references 2020-06-10 10:49:31 -04:00
renovate[bot]
bb94af9b58 chore(deps): update dependency eslint-plugin-cypress to version 2.11.1 🌟 (#7636)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-09 21:18:12 +06:30
Zach Bloomquist
8203f02f92 release 4.8.0 [skip ci] 2020-06-08 16:32:19 -04:00
Zach Bloomquist
1875027073 chore: decaffeinate server tests, scripts, other files (#7591) 2020-06-05 15:12:53 -04:00
Ben Kucera
4cfcae28f0 feat: test config overrides (#5346)
* decaffeinate: Rename browser.coffee from .coffee to .js

* decaffeinate: Convert browser.coffee to JS

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

* temp 02/14/20 [skip ci]

* add beforeEachRestoreRunner to select specs, remove support file hook

* temp 03/03/20 [skip ci]

* fix more specs due to support file change

* fix errored spec

* add isInteractive config to many specs

* update yarn.lock

* use yarn.lock from develop

* fix nested suite configurations

* fix nested suite configurations 2

* force isInteractive in driver/support file

* update more specs to use test config format

* update more specs to use test config format 2

* update more specs to use test config format 3

* update more specs to use test config format 4

* update more specs to use test config format 5

* fix cli/types tests, unit tests

* cleanup

* allow .isBrowser to support array, use .isBrowser for per-test-config

* allow null browser test/suite config value

* temp 04/10/20 [skip ci]

* restore test originalTitle when skip due to browser

* add tests for per-test-config baseUrl

* update .isBrowser error message

* fix rerunning hooks on top navigation

* rename duplicate issue number

* up timeout for server/integration test

* change test to be more specific

* rename TestOptions, add baseUrl test, override xit xdescribe methods

* add tests for xit/xdescribe

* disable video for flaky e2e test

* fix lint-types, e2e snapshot

* try 2: fix rerun before/after hooks

* temp 04/29/20 [skip ci]

* change logic to rerun before hooks after top navigation

* fix windowSize for browser e2e test

* fix windowSize for xvfb chrome in e2e test

* ok fine, just disable screenshots

* perf: faster lookup for hooks without runnables

* fix afterAll hook switch logic

* backport to before/after fix

* backport to before/after fix 2

* fix noExit passed to e2e test inline options

* remove extra root afterhook check

* add issue link..twice

* cleanup function to arrows

* remove Cypress object proxying related code for certain utils

* use getTest() as we did previously

* remove Cypress object proxying related code for certain utils

* fix Cypress._RESUMED_AT_TEST access

* fix Cypress._RESUMED_AT_TEST access 2

* fix runner.getResumedAtTestIndex, state accesses

* fix firefoxgcinterval access

* fix arrow function

* fix firefoxgcinterval access

* try a simpler way to fix afterAll hook issue

* fix decaf after merge

* cleanup internal-types.d.ts

* fix internal-types

* fix comment, getTestFromRunnable signature

* remove unneeded lastTestInSuiteLogic

* fix after merge: many decaffed specs, typedefs

* minor cleanup

* fix typedefs: add taskTimeout

* minor typedef fix, fix more specs modifying config()

* fix e2e snapshot

* fix flake: waiting_spec cancel outstanding XHR between tests

* fix flake

* change config mutation logic, add tests, update typedefs

* add env support to testConfigOverride

* fix specs: remove isInteractive override, add to beforeEach

* move testConfigOverride to file

* finish moving local config logic to cy.js

* fix typedefs cypress.d.ts

* fix minor minor dtslint

* minor spec cleanup

* chunk: typescript spec fixes, bind Cypress.$

* apply chunk: typescript spec fixes, bind Cypress.$

* fix stop-only

* fix stop-only 2

* extend the jqueryProxyFn in the constructor

* remove experimental code

* rename spec files for overrides, cleanup

* rename snapshots + tests to match updated test config overrides

* fix firefox flake: navigation_spec

Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2020-06-04 11:26:11 -04:00
Ben Kucera
4f385417b6 chore: typescript spec fixes, bind Cypress.$ (#7580)
* apply chunk: typescript spec fixes, bind Cypress.$

* fix stop-only

* fix stop-only 2

* extend the jqueryProxyFn in the constructor

* remove experimental code

* use the default ts export

* use the default ts export for .js files too

Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2020-06-03 18:39:46 -04:00
renovate[bot]
bdcfe42f79 chore(deps): Update dependency @percy/cypress to version 2.3.1 🌟 (#7550)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-02 21:30:34 +06:30
Jennifer Shehane
33207aab9f Pin dependencies that were not pinned (#7549)
* Pin dependencies that were not pinned

* yarn lock
2020-06-02 12:44:11 +06:30
Chris Breiding
f986239f25 release 4.7.0 [skip ci] 2020-05-26 19:47:13 -04:00
renovate[bot]
b7eec83655 chore(deps): Update dependency electron-builder to version 22.6.1 🌟 (#7429) 2020-05-26 13:00:09 -04:00
Zach Bloomquist
83856c3ed6 release 4.6.0 [skip ci] 2020-05-20 13:48:45 -04:00
Chris Breiding
a3fbab0fc8 Handle webpack protocol file opening (#7296)
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
2020-05-19 13:59:09 -04:00
Gleb Bahmutov
a2c0bc3e3e include CLI TS types in a way to avoid clashing with Jest (#7352) 2020-05-15 17:31:22 -04:00
Zach Bloomquist
6960f7cd78 Rewrite JS/HTML using AST-based approach (#5273)
* Add winPropAccessor to security.js, remove other replacers

* Add start of Cypress.resolveWindowReference

* Add regexes for dot and bracket access

* Some security_spec tests pass with new injection

* Add resolveWindowReference unit tests

* Old security_spec now passes with resolveWindowReference

* Inject stub resolveWindowReference so proxy still works outside of Cypress

* wip: rewrite HTML + JS with tokenizer

* Move to using esprima + hyntax to rewrite JS + HTML

* remove comment; oneLine makes the whole thing commented

* Fix tests, apple.com edge case

* wip: add getOrSet

* Revert "wip: add getOrSet"

This reverts commit a5c647c00f.

* release 3.5.0 [skip ci]

* use recast to replace window property accesses

* replace assignments to top properly

* fix yarn.lock

* bump deps

* update integration tests

* remove old security ts?

* fix integration spec

* always ignore js interception failure

* use globalThis instead of window

* add experimentalSourceRewriting flag

* restore regex-writer spec

* fix types

* update config_spec

* add source rewriting spec

* cleanup

* simplify rewriting logic, move rules into rewriter package

* create threaded rewriting tool for non-streaming use

* update @packages/rewriter to use threads for async

* use async rewriting where convenient

* add worker-shim.js

* add performance info to debug logs

* properly handle +=, -=, ...

* add proxy, rewriter to unit-tests stage

* cleanup

* use parse5 to rewrite HTML, strip SRI

* update tests

* reorganization, cleanup

* rewrite ALL parent, top identifiers except in a few cases

* handle many JS edge cases

* ensure parse5@5.1.1 is installed

* update yarn.lock

* update tests

* add debugging, add tests

* add attempted repro for .href issue

* implement source maps + extending inline source maps

* update opts passing in proxy layer

* fix sourcemap naming structure

* update tests to account for sourcemaps

* sourcemap tests

* remote source maps work

* comment

* update rewriter tests

* clean up TODOs in resolveWindowReference

* remove @types/nock

* clean up todos in deferred-source-map-cache

* fix rewriter build script

* fix concatStream import

* bump expectedresultcount

* clean up js-rules

* threading improvements, workaround for Electron segfault

* no visit_spec for now

* fix 6_visit_spec

* update MAX_WORKER_THREADS

* add repro for #3975

* cleanup

* cleanup

* make better use of namedTypes and builders

* get rid of the horrific closureDetectionTernary

ast-types keeps track of scope, so it is unneeded

* fix #3975, #3994

* add x-sourcemap, sourcemap header support

* snap-shot-it 7.9.3

* add deferred-source-map-cache-spec

* add tests

* Throw error in driver if AST rewriting fails

* Fix "location = 'relative-url'"

* fix max recursion depth

* slim down some fixtures

* fix window.location usage

* don't mess with `frames` at all

* no integration tests

* skip testing apple.com for now

* update wording: regex-based vs. ast-based

* skip real-world tests for now

* add some padding to process.exit workaround

* fix resolvers_spec

* fix html-spec

* cleanup

* Update packages/rewriter/lib/js-rules.ts

* Update packages/driver/src/cypress/resolvers.ts

* just import find by itself

* privatize typedefs for Cypress.state, remove .gitignore, remove dead code

Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
2020-05-11 12:54:14 -04:00
renovate[bot]
885fb352bf chore(deps): Update dependency snap-shot-it to version 7.9.3 🌟 (#7283) 2020-05-11 14:21:18 +06:30
Jennifer Shehane
a27bd34df3 Reporter error improvements (#3930) 2020-05-06 12:18:29 -04:00
Chris Breiding
15ad2d4973 release 4.5.0 [skip ci] 2020-04-28 16:24:09 -04:00
renovate[bot]
45b759c408 chore(deps): update dependency pretty-ms to version .x 🌟 (#7104)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-22 15:59:21 +06:30
renovate[bot]
8cbb7832ad chore(deps): Update dependency lerna to version 3.20.2 🌟 (#7102)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-22 13:27:45 +06:30
Zach Bloomquist
6cbeda8f37 release 4.4.1 [skip ci] 2020-04-20 14:49:17 -04:00
Zach Bloomquist
437f09b9e5 release 4.4.0 [skip ci] 2020-04-13 15:28:00 -04:00
Kukhyeon Heo
e22b362d4c Out-of-the-box TypeScript Support (#5906)
* Out-of-the-box TypeScript support for plugins

* Out-of-the-box TypeScript Support for tests.

* Fix server unit tests.

* Don't use bundled typescript.

* Added esModuleInterop option.

* Fixed unit tests.

* Added simple_tsify to integration test.

* Added integration tests for ts spec files.

* simple_tsify to ignore transpiling json files.

* transpile on flush.

* Fix lint failure.

* Added error message.

* Add error message for restart test runner for support file.

* Added JSDoc comment.

* Remove preset-typescript.

* Fix integration test failure.

* Fix type errors.

* Add e2e test for typescript

* Fix lint error.

* Add plugin support and e2e test.

* Fix server unit test failures.

* Update snapshots.

* Migrate typescript compilation code to browserify-preprocessor

* Remove unnecessary files and test.

They're tested in preprocessor.

* Fix test failures.

* Update @types/react.

* Update yarn.lock.

* Clear name: registerTS -> tsRegistered.

* Clarify why tsRegistered = true exists.

* Add working examples for support and plugins.

* Move TypeScript tests to its own file.
2020-04-13 21:39:13 +06:30
renovate[bot]
5c048802a3 chore(deps): update dependency @cypress/commit-message-install… (#6941)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-06 14:21:23 +06:30
Zach Bloomquist
69ea99f5cb release 4.3.0 [skip ci] 2020-03-30 14:18:36 -04:00
Gleb Bahmutov
abf4d85869 switch to electron-builder to code sign and notarize Cypress ap… (#6013)
* electron@7.x

* node12.8.1-chrome78-ff70

* Revert "node12.8.1-chrome78-ff70" for now

This reverts commit db2d521994.

* update sendCommand to log on all sendcommands

* promisification in 6.x

* Revert "Revert "node12.8.1-chrome78-ff70" for now"

This reverts commit 57fe764098.

* fix sendcommand

* fix cdp in electron

* fix desktop-gui test

* skip tests that will be fixed by #4973

* bump MAX_ALLOWED_FILE_SIZE :/

* update electron browser spec

* make new dialog code null-proof

* add failing e2e test for issue 5475

* bump electron packager

* add e2e snapshot

* update deprecated electron getters/setters

https://github.com/electron/electron/blob/7-1-x/docs/api/modernization/property-updates.md

* build and test on Mac

* use electron-builder 20.41.0

that adds an option to use hardened Mac OS, which is necessary
for code notarization later.

See https://github.com/electron-userland/electron-builder/releases/tag/v20.41.0
and https://github.com/electron-userland/electron-builder/pull/3858

* electron-builder and pass hardenedRuntime: true

* uncomment build

* upload built binary on mac

* back to 20.41.0, trying after sign hook without success

* use current electron-builder alias instead of build

* retry smoke test on first failure

* testing

* trying to notarize signed app (that does not have node_modules yet)

* env variable names

* copy node_modules ourselves

* build and bundle binary on mac on circle, inject new context

* enable build steps before electron build

* increase mac build timeout

* update build folder on mac

* uncomment actual electron build command

* set linux target to zip

* set zip as target for all platforms

* updated steps

* put notarization hook back

* tweaks for icons

* remove dist electron before code sign

* icons per platform

* make node_modules copy path platform-specific

* fix linux build unpacked folder

* build mac

* fix lint

* test new mac binary against kitchensink

* working on Linux build

* try building entire thing on Linux

* removing correct electron dist folder

* increase zip size limit for now

* add folder rename on Linux from linux-unpacked to Cypress

* print file sizes before zipping

* move linux-unpacked to build dir function

* try deleting second electron file, but code signing probably would not work

* test windows build [build binary]

* ignore tsc errors

* windows build path

* windows [build binary]

* update windows build folder

* increase binary build timeout on Mac

* no need to pass our dist folder

* adding explicit list of additional binaries to code sign on mac

* yarn lock

* uncomment necessary build steps

* electron dir for Linux

* yarn lock again

* back to execa v3

* use execa v4 in packages launcher

* yarn lock again and again

* updated tests that use execa

* print build folder

* add executable name on Linux

* get rid of execa.shell in build scripts

* remove old and commented out code

* need to test building binary on Windows

* throw error from after sign hook if fails

* use execa to zip

* yarn lock

* fix after merge variable

* update test

* add nohoist ffmpeg installer

* patch

* yarn types pass

* yarn lock has binary

Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2020-03-24 21:34:52 -04:00
renovate[bot]
b579c7e114 chore(deps): Update dependency @babel/core to version 7.8.7 🌟 (#6763)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2020-03-23 17:11:27 +06:30
Andrew Smith
bfc93aad70 Clean-deps without dependencies on packages (#6774)
Removes all node_modules without dependnecy on lerna or any other package.
2020-03-23 14:17:49 +06:30
Zach Bloomquist
d810950379 Switch request, request-promise to @cypress/ forks (#6777) 2020-03-19 11:48:24 +06:30
renovate[bot]
ead1d38e47 chore(deps): update dependency jscodeshift to version 0.7.0 🌟 (#6765)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-18 14:27:39 +06:30
Gleb Bahmutov
f225f3e831 add visual testing in desktop-gui settings page (#6421)
* add Percy plugin and a single desktop-gui snapshot

* add desktop gui visual test to circle workflow

* update desktop-gui to start a server and not just visit dist/index.html

* add a few more visual snapshots for examples

* adjust Percy settings a little

* add start-test to desktop-gui

* update settings spec
2020-03-17 12:05:30 -04:00
Kukhyeon Heo
ee494d04ee Added TypeScript type checker + Fixed type errors. (#5780)
* Added type_check.js

* Now checks cli, too.

* Ignored a line that should fail.

* Removed cli shims and post-install.

* Updated @types/chai to fix type error.

* Fixed keyboard type errors.

* Updated typescript to 3.7.2 to fix window.Node error in dom/document.

* Removed tsconfig errors that caused type errors in reporter and runner.

* Ignored error test by dtslint. Becaust it's done by type_check.js

* Added npm command.

* Added it to CI.

* Added skipLibCheck option.

* Removed checking chai folder existence.

copy of chai is unnecessary.

* Added 'ignore-progress' option for CI.

* Show success message when type check is finished successfully.

* Use ignore-progress option on CI.

* Moved type definitions from devDependencies to dependencies.

* Fixed new type errors after rebase.

* Updated type errors.

* Removed cli. Because its types are checked by dtslint.

* type_check -> type-check for consistency.

* Updated json-schema.

* Updated blob-util.

* Fix wrong command in CI.

* Revert "Updated blob-util."

This reverts commit e46549af54.
Because it's a breaking change.

* Remove copies of @types if exists.

* Fix stream buffer type error.

* Fix type errors in ui-components.

* Fix type failure.

* Fix lint error.

* Fix type errors

* Regenerate yarn.lock

* Fix type error.

* Fix type failures.

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
2020-03-17 11:01:31 +06:30
Zach Bloomquist
b44e1e77b3 release 4.2.0 [skip ci] 2020-03-16 16:37:52 -04:00
renovate[bot]
aeb851ef1f chore(deps): Update dependency @cypress/commit-message-install… (#6732)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-16 15:49:23 +06:30
Gleb Bahmutov
2a0bc32700 cypress cache list prints last accessed date (#6627)
* get last access timestamps and print with cache versions

* remove done TODO

* start trying to save HTML but only after snapshot text is confirmed

* store cli test output HTML as static pages

* set our color for table heading

* make code readable

* lock file again

* update saved HTML file

* refactor cache spec

* add test with no access time:
2020-03-09 09:27:54 -04:00
Jennifer Shehane
7eed6ad581 Test Cypress in Chrome 80, FF 72, Debian 10 (#6428)
* update docker image to chrome 80 and firefox 72 image

* Use image with compatible 12.8.1 Node version

* update docker script

* improve debug logging of launched browser

* run tests with correct color depth

* force run with new cache version

* revert docker image

* Revert "revert docker image"

This reverts commit 93d03446cc.

* update gitignore

* generate 2048-bit keys

* add script to regenerate certs, if we need to do this again

* update certs (ran regenerate-certs.sh)

* copy, don't symlink - won't work on win anyways

* reregen

* cleanup

* don't use https-pem, it's too smol

see https://github.com/watson/https-pem/issues/3

* decaffeinate: Rename ca.coffee and 11 other files from .coffee to .js

* decaffeinate: Convert ca.coffee and 11 other files to JS

* decaffeinate: Run post-processing cleanups on ca.coffee and 11 other files

* https-proxy decaf cleanup

* wip: ca_version

* add versioning for CA store

* add regenerate:certs script

* add timings to ca_spec

* unneeded patch-package

* fix yarn.lock

Co-authored-by: Zach Bloomquist <github@chary.us>
2020-03-03 16:25:02 -05:00
Zach Bloomquist
844606bced release 4.1.0 [skip ci] 2020-02-28 17:07:18 -05:00
Zach Bloomquist
e2ea5bf663 Fix patch-package (#6583)
* fix patch-package

- don't hoist dependencies that are patched, this way we can be assured the path is always correct
- put all patches in root postinstall so postinstall-postinstall is guaranteed to work

* wip

* Revert "fix patch-package"

This reverts commit 5583f21478.

* use per package patches

* don't ignor engines or silence

* try: make sinon patch devonly

* fix socketspec

* run full ci on this branch

* bump xcode tools to bump mac node version

* also run appveyor

* Revert "run full ci on this branch"

This reverts commit c3e52d09ec.

* Revert "also run appveyor"

This reverts commit bfe7b0499a.
2020-02-28 12:17:54 -05:00
renovate[bot]
a051f7ac19 chore(deps): update dependency eslint-plugin-cypress to version… (#6589)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-02-28 13:33:52 +06:30
renovate[bot]
645e537322 chore(deps): update dependency @cypress/commit-message-install… (#6587)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-02-28 11:26:34 +06:30