Commit Graph

1327 Commits

Author SHA1 Message Date
Emily Rohrbough 17fd75f04b chore: clean up the globbing for supportFile(s) on test start (#22903) 2022-08-02 19:21:57 -05:00
Bill Glesias 2612219501 feat: add modify obstructive user agent code for electron to strip el… (#22958)
* feat: add modify obstructive user agent code for electron to strip electron and cypress out of the UA string.

* fix user agent destructuring error within unit tests

* remove explicit CDP command and opt for _setUserAgent. add test to not override passed in user agent via config

* add get user agent method to electron and update tests

* move user agent override in electron under experimentalModifyObstructiveThirdPartyCode over experimentalSessionAndOrigin

* move position of setting user agent to browser launch, hopefully fixing issues in CI with parallelization between parent/child processes

* update stale documentation and remove no longer necessary stub of getUserAgent

* add user agent to get user agent debug log

Co-authored-by: Matt Schile <mschile@gmail.com>
2022-07-29 22:46:27 -04:00
Matt Henkes f147ebbcc6 fix: call screencastOpts as a function for starting a screencast on electron. (#23001)
Co-authored-by: Mark Noonan <mark@cypress.io>
2022-07-29 08:27:00 -05:00
Emily Rohrbough 85ee714217 chore(server): clean up server code (#23002)
* remove dead code

* looking a little closer, runAllSpecsInSameBrowserSession is not used and default browser was already set to electron
2022-07-29 16:30:40 +10:00
Emily Rohrbough 65d29cdcf3 chore: remove dead server code (#22902) 2022-07-25 10:29:14 -05:00
Hugo Alliaume f512f75ceb fix(config): allow "additionalIgnorePattern" to be an array of strings (#22826)
* fix(config): allow "additionalIgnorePattern" to be an array of string

Also set default value to "[]", to prevent issue when running E2E tests.

* chore(test): set "additionalIgnorePattern: undefined" for Cypress-in-Cypress config

* chore: update snapshots

* chore: update types for additionalIgnorePattern

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-07-21 11:19:06 +10:00
mirobo 9517b60e9d fix: don't cut off a long runUrl in console (#22619)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Ben M <benm@cypress.io>
Co-authored-by: Adam Stone <adams@cypress.io>
2022-07-19 15:04:56 -04:00
Adam Stone 1b688694fe fix: Ensure that file watchers are closed before Electron exits (#22606)
* Adding prototype before-quit handler to handle async teardown.

* Getting binary builds

* Let's try this then

* Working the async changes backwards, hope I got them all. Unit tests will be a disaster currently.

* Actually getting build artifacts for testing

* Moving logic to server interactive/run

* fix: Fix some tests

* fix: Revert changes to circle config

* fix: Fix some tests

* fix: Fix more tests

* fix: Remove dead code comment

* fix: Fix ProjectDataSource tests

* fix: Add comment prefix

* fix: Remove comment and unnecessary async

* fix: Build Mac binary

* Reverting run changes

* Addressing PR comments. Cleaning up a few naming quibbles I had.

* Addressing TODO regarding onLoadError watcher cleanup.

* Correcting catch

* Fighting some unref errors on these catches

* Reverting making this private en lieu of binding

* Should have left these as instances, whoops

* Removing unnecessary test that was previously skipped

* Adding a couple cheap unit tests for the new interactive mode behavior

Co-authored-by: Tyler Biethman <tbiethman@gmail.com>
Co-authored-by: Tyler Biethman <tbiethman@users.noreply.github.com>
2022-07-17 15:57:10 -05:00
Puranjay Jain 198b28d1d7 fix: for hosts typing in cypress.d.ts (#22718)
* Update cypress.d.ts

Fix the hosts typing in cypress typings file

* fix: Add ts type for hosts in a server base file
2022-07-14 22:30:55 -07:00
Chris Breiding 5573fe50b0 fix: Make cross-origin document.cookie work (#22594) 2022-06-30 14:03:21 -04:00
Muaz Othman 4726ea90a9 feat: Display Cypress Dashboard metrics in the Specs Explorer (#21250)
Co-authored-by: Muaz Othman <muazweb@gmail.com>
Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
Co-authored-by: Mike Plummer <mikep@cypress.io>
Co-authored-by: Peter Stakoun <peter@stakoun.com>
Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-06-27 17:37:36 -05:00
Dylan Schlabach 75a5daf9d5 fix: memory leak caused by storing base64 encoded files recieved by CDP Network.requestWillBeSent (#22460)
* filtering out data urls from networkRequestWillBeSent CDP requests

* fix: memory leak caused by storing base64 encoded files recieved by CDP Network.requestWillBeSent

* Update packages/server/lib/browsers/cdp_automation.ts

grammar :)

Co-authored-by: Sam Tsai <samtsai@gmail.com>

* Update packages/server/lib/browsers/cdp_automation.ts

grammar :)

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>

* added unit tests

Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
Co-authored-by: Sam Tsai <samtsai@gmail.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-06-23 09:35:49 -07:00
Chris Breiding a21c942ee4 fix: Improve cross-origin cookie handling (#22320) 2022-06-23 11:00:52 -04:00
Tyler Biethman defde91f2a fix: process_profiler follow up work for v10 (#22363)
* fix: process_profiler follow up work for v10

* Converting index file to ts
2022-06-22 11:44:58 -05:00
Zach Bloomquist d01932bf75 fix: retry on EMFILE always, lint sync FS calls (#22175)
* fix: use graceful-fs always, warn in development on sync calls

* skip prop linting in some dirs

* eslint rules

* use AST-based lint rule instead

* comment

* ignore existsSync

* run without nextTick

* remove dev warning code

* fix order

* register TS first

* fix tests

* fix test

* cover new call site

* fix new test
2022-06-16 14:35:31 +10:00
Tyler Biethman f8f2418a07 fix: Don't include project path with supportFile glob (#22222)
* fix: Don't glob project path in supportFile lookup

* Updating unit tests around supportFile 'isFolder'

* Adding unit test to validate the projectRoot isn't globbed

* Adding system test to validate successful run

* This is more accurate

* Updating snapshot to reflect now missing absolute path from the supportFile value

* Adding e2 launchpad test

Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2022-06-10 10:50:53 -05:00
Ryan Manuel 203758f708 fix: properly run multiple specs in run and headed mode on linux and windows in chrome (#22168)
* fix: properly run multiple specs in run and headed mode on linux and windows

* fix: properly run multiple specs in run and headed mode on linux and windows

* Update test

* Update test

* Fix issue with running headed in linux and windows

* Improve test

* Update packages/server/lib/browsers/browser-cri-client.ts

* PR comments

* PR comments

* Fix test failure due to refactor

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2022-06-10 09:38:06 -05:00
Lachlan Miller abd986aa41 fix: support ESM projects using TypeScript with ts-node/esm (#22118)
* fix: support ESM projects using TypeScript with ts-node/esm

* better error handling

* fix test

* indentation

* register ts-node via --require hook

* be less aggressive with erroring

* update fix system tests

* remove obsolete test

* handle case of not using typescript

* replicate 9.x behavior for legacy plugins w/ ts-node

* make test project valid and adjust tests accordingly

* use ts-node/esm transpile only

* dummy

* extract util function

* merge in refactor using projectFixtureDirectory

* fix test
2022-06-09 21:20:26 +10:00
Tim Griesser b83bdc2000 fix: #22038 support esm import for windows (#22042)
* fix: #22038 better windows ESM interop

* updates from @flotwig feedback
2022-06-02 15:24:01 -04:00
Rich Rauenzahn a0a64cc851 fix: Change ffmpeg to post process at priority 20 (#21587)
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2022-06-02 08:15:44 -07:00
Tim Griesser 369a865237 fix: partial fix for #21997 & #22004, throw the originalError (#22009)
* fix: partial fix for #21997 & #22004, throw the originalError

* throw originalError test

Co-authored-by: Zach Bloomquist <git@chary.us>
2022-06-01 16:54:07 -04:00
Tim Griesser 566a7b1feb fix: UNIFY-1774 error if component config is not sourced for webpack/vite (#21563)
* fix: UNIFY-1774, throw error if we do not detect a webpackConfig for the user

* remove dead code, rely on auto-sourcing webpack config

* fix error styles, exit the devServer process when config is missing, guard against empty remoteState

* Add missing webpack for todos project

* Update npm/webpack-dev-server/src/makeWebpackConfig.ts

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-05-31 14:34:05 -04:00
Jess 996823cd94 fix: support loading config files for projects with type module, without esbuild (#21574)
* fix: support loading config files for projects with type module, without esbuild

* fix: adding process.cwd() to require.resolve paths so that system-tests do not use local dev version of esbuild

* fix: add missing esbuild in test projects

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
2022-05-31 14:25:08 -04:00
Tim Griesser b0e32f8f8e fix: UNIFY-1408, warnings should be nested appropriately & clearable (#21630)
* fix: UNIFY-1408, warnings should be nested appropriately & clearable

* Add fix / test for UNIFY-1604, UNIFY-1732

* better tests around baseUrl handling, remove unneeded logic

* Fix stub usage, test failure, pingBaseUrl behavior

* fix duplicate test title
2022-05-27 11:31:07 -04:00
Ryan Manuel f2bce02f5d fix: issue with compilation failures in component testing (#21599)
* fix: issue with compilation failures in component testing

* add tests

* fix tests

* Refactor tests

* Fix tests

* Refactor tests

* Fix tests

* Fix paths for dependencies in system tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* test fix for initial esbuild failures

* Fix tests

* Add back ESLintPlugin

* Add comments around our special esbuild handling logic in vite

* Code cleanup and additional test scenario

* Add config syntax error tests

* Improve tests

* Update comment and remove unused variable

* Remove unneeded hook in webpack dev server

* Disable dev server overlay

* Revert "Remove unneeded hook in webpack dev server"

This reverts commit 98b2f269ae.

* PR comments

* Accidental removal

* Fix dedent

* PR comments
2022-05-25 18:02:05 -05:00
Zach Bloomquist 3c0c864fa9 chore: clean up debug statements in preparation for 10.0 release, add debug docs (#21621)
Co-authored-by: Muaz Othman <muazweb@gmail.com>
2022-05-25 17:40:04 +00:00
Tyler Biethman c2b270f128 chore: Removing workaround for long Cypress verification times (#21541)
* chore: Removing workaround for long Cypress verification times

* Blank commit for Percy build

* Getting a build

* Need the mac build

* Missed a few!

* We apparently still need this one.
2022-05-19 12:29:56 +10:00
Zach Bloomquist 3055c79822 chore: remove unused find_system_node util (#21529)
* chore: remove unused find_system_node util

* bump
2022-05-17 15:08:55 +00:00
Tyler Biethman 27cbfbab26 Merge branch '10.0-release' into tbiethman/develop-into-10-with-electron 2022-05-17 07:57:19 -05:00
Lachlan Miller abea165832 fix: do not include non specs when globbing using --spec in run mode (#21462)
* fix: do not include non specs when globbing using --spec in run mode

* update pattern

* fix test

* update cdp spec

* wip - updates

* update snapshots

* update non-proxied spec

* update snaps

* update snaps

* rename specs

* update spec

* wip - snapshots

* snaps

* snaps

* update spec names

* update

* update test

* snaps

* update snap and spec

* snaps

* correct spec pattern

* snaps

* revert

* update spec and snapshots

* fix test

* update tests

* fix test

* update test

* update snapshot

* update snaps

* include coffee in specPattern

* update snapshots

* update snaps

* rename specs

* snaps

* update test

* update snapshot

* update

* snaps

* update snap

* update snaps

* fix test

* unskip test

* snaps

* add test
2022-05-17 18:11:42 +10:00
Tyler Biethman e437649204 Merge branch '10.0-release' of https://github.com/cypress-io/cypress into tbiethman/develop-into-10-with-electron 2022-05-16 17:09:05 -05:00
Rachel 6492d6cdda fix: Unify 1232 the keyboard shortcuts button is not keyboard accessible (#21409) 2022-05-16 14:06:13 -03:00
Tyler Biethman 33a60f8521 Merge branch '10.0-release' into tbiethman/develop-into-10-with-electron 2022-05-16 09:20:27 -05:00
Alejandro Estrada 3274da7842 fix: terminal error message for non migrated config (#21467)
* fix: terminal error message for non migrated config

* fix: terminal error message for non migrated config
2022-05-13 16:56:01 -05:00
Alejandro Estrada fbe645224e fix: handle errors on plugins migration child process (#21442)
* fix: handle errors on plugins migration child process

* Update error handler

* Remove console.log
2022-05-13 16:04:35 -05:00
Tyler Biethman 74fa12ab11 Merge branch 'develop' of https://github.com/cypress-io/cypress into tbiethman/develop-into-10-with-electron
# Conflicts:
#	circle.yml
#	packages/driver/cypress/integration/commands/actions/trigger_spec.js
#	packages/driver/cypress/integration/commands/actions/type_spec.js
#	packages/driver/cypress/integration/commands/files_spec.js
#	packages/electron/package.json
#	packages/launcher/lib/darwin/util.ts
#	packages/launcher/package.json
#	packages/server/__snapshots__/args_spec.js
#	packages/server/__snapshots__/cypress_spec.js
#	system-tests/projects/non-proxied/cypress/fixtures/cy-non-proxied.png
#	yarn.lock
2022-05-12 12:51:59 -05:00
Mark Noonan a218f96223 feat: distinguish app vs launchpad utm_source when using utm params (#21424) 2022-05-12 13:11:00 -04:00
Tyler Biethman 8311cf15ff chore(deps): Updating electron to v18 + node v16.13.2 (#21418)
* chore: Updating electron to v18 + node v16.13.2

* Updating origin test, it needs to be fixed a different way

* Removing origin workaround for config_env specs, it should not be necessary.

* Removing now-unused semver dependency
2022-05-12 12:06:30 -05:00
Tim Griesser 383bdb1d3d fix: UNIFY-1625 Runs tab not updating in real time (#21370)
* feat: improved CloudDataSource caching & tests

* feat: pushFragment subscription, for updating the client with remote data (#21408)

* refactor: add pushFragment utility for pushing remote data into the client

* fix: UNIFY-1625 Runs tab not updating in real time (#21412)

* allow returning a Response object in the remoteGraphQLIntercept, handle 401
2022-05-12 09:06:12 -04:00
Ryan Manuel 35ab63307c chore: fix flaky windows tests (#21354) 2022-05-10 10:10:09 -05:00
Bill Glesias 04dc2e3130 Merge branch '10.0-release' of github.com:cypress-io/cypress into md-10.0-merge 2022-05-06 10:07:06 -04:00
Alejandro Estrada fa214e29f8 feat: restart browser/server on config change (#21327)
* feat: restart browser/server on config change

* Add tests

* Refresh server if devServer is changed

* Do not launch browser on start, fix open browser

* Update devServer config pairing w/ Zach

* Update with feedback
2022-05-05 16:48:17 -05:00
Bill Glesias bd7e43ed25 Merge branch '10.0-release' of github.com:cypress-io/cypress into md-10.0-merge 2022-05-05 13:41:50 -04:00
Bill Glesias 61bd6c8021 Re-enable page events when connecting to a new spec via an existing
chrome instance within a new tab

try updating stale frame tree

add additional debugging around frame tree updating

simply just re enabled page events for CDP
2022-05-05 10:54:47 -04:00
Ryan Manuel 9612686241 fix: issue with generating cypress.config.js in projects with type of module (#21323)
Co-authored-by: Zach Bloomquist <git@chary.us>
2022-05-04 16:41:11 -05:00
Bill Glesias 2830c9e63d Merge branch '10.0-release' of github.com:cypress-io/cypress into md-10.0-merge 2022-05-04 14:44:14 -04:00
Bill Glesias c8331fc54f set remote to primary domain when app is reserved in e2e testing mode 2022-05-04 10:38:48 -04:00
Bill Glesias 577edc698e opt for getPRimary over current in getConfig() in the project base so set remote to primary in the driver 2022-05-03 14:55:53 -04:00
Zach Bloomquist b856a74b43 fix(launchpad): avoid crash when authenticating before selecting project (#21234) 2022-05-03 17:11:40 +00:00
Ryan Manuel c0e009bd85 fix: moving away from runner and disconnecting websockets stops listening for changes to webpack build (#21281) 2022-05-02 16:29:16 -05:00