Commit Graph

2102 Commits

Author SHA1 Message Date
Lachlan Miller 91beb9012c feat: experimental single tab run mode for component testing (#23104)
* revive logic to run CT in a single tab

* add feature flag: experimentalSingleTabRunMode

* remove log

* reset browser state between tests

* document single tab run mode experiment;

* add system test for experimental run mode

* fix snapshots

* use more simple project for testing

* additional guard;

* fix test

* Apply suggestions from code review

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

* destroy aut after each spec

* update snapshot

* fix types

* add experiment flag error

* add warning when using experimental flag with e2e

* build binaries for experimentalSingleTabRunMode feature

* build binaries take 2

* make error message more open ended

* destroy AUT later in run mode lifecycle

* add additional assertion around experimental flag

* simplify error

* remove test code from production code

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-08-16 10:44:14 +10:00
mirobo f7dce39876 fix: escape backslashes in downloadFolder for Firefox on Windows #17896 (#23006)
* fix: escape backslashes in downloadFolder for Firefox on Windows

* fix import of doubleEscape in packages/server/lib/browsers/firefox.ts

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* don't run ls command on Windows

* Revert "don't run ls command on Windows"

This reverts commit deec721b06.

* chore: add unit test to verify double escape behavior

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Rachel <rachel@cypress.io>
2022-08-15 20:26:54 -04:00
Zach Bloomquist 4580330763 chore: WebKit support (development-only) (#15533) 2022-08-15 22:53:37 +00:00
Rachel c40a120aa7 chore: skip or fix flaky tests (#23167) 2022-08-15 08:50:34 -07:00
Kukhyeon Heo 0aa89fa5b3 chore: add check-ts command to pkg/driver (#22912)
Co-authored-by: Blue F <blue@everblue.info>
Co-authored-by: Rachel <Raquel.rudermano@gmail.com>
Co-authored-by: Rachel <rachel@cypress.io>
2022-08-15 09:46:24 -05:00
Emily Rohrbough f1122fcf62 fix: clear session state when changing specs in open mode (#23146) 2022-08-12 13:00:01 -05:00
Emily Rohrbough 0729a6833b feat: add testIsolation option and support describe-only overrides (#23040)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2022-08-12 11:56:39 -05:00
Kukhyeon Heo 2d119ad46a chore: Intregrate runner packages. (#23028)
* chore: Intregrate runner packages.

* Remove unnecessary Studio react files.

* Remove unnecessary gif

* runner-shared to runner-ct.

* fix path.

* fix package.json

* Remove scss files from runner-ct

* Remove runner-ct

* Remove runner-shared and runner-ct comments.

* Feedback

* chore: reduce parallelism for reporter-componen-tests

* chore: reduce paralelleism

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-08-11 14:07:10 +10:00
Emily Rohrbough 0129a80883 fix: cypress hang caused in run mode when test:before:run handler throws (#23226)
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2022-08-10 14:53:05 -05:00
Mark Noonan 3d98f98136 fix: save spec filter term (#22755) 2022-08-09 12:44:35 -04:00
Eiríkur Fannar Torfason d65e2d2fab fix: Infinite recursion when identical intercept routes exist (#22940)
* Minimal fix, hacky repro

* Convert getRouteForRequest into a generator function

* Create separate test for reproducing the original issue

* Remove TODO, check .done property instead of .value

* Improve readability

Co-authored-by: Eiríkur Fannar Torfason <eirikur.torfason@gmail.com>
Co-authored-by: Tyler Biethman <tbiethman@users.noreply.github.com>
2022-08-05 12:59:15 -05:00
Bill Glesias 3a78e1f570 chore: add experimentalModifyObstructiveThirdPartyCode documentation to settings page and experiments (#23088) 2022-08-04 10:39:31 -04:00
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
Jordan 4131b1fa84 feat(angular): angular mount (#22858)
Co-authored-by: Zachary Williams <zachjw34@gmail.com>
2022-07-26 17:44:44 -05:00
renovate[bot] 7c3a4f8bb6 chore(deps): update dependency nock to v13.2.9 🌟 (#22854)
* chore(deps): update dependency nock to v13.2.9 🌟

* chore: update nock api from v12 to v13 by changing socketDelay to delayConnection. See https://github.com/nock/nock/releases/tag/v13.0.0 for more details

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-07-25 15:17:32 -04:00
Emily Rohrbough 65d29cdcf3 chore: remove dead server code (#22902) 2022-07-25 10:29:14 -05:00
Bill Glesias 5ff15046e2 feat: add experimentalModifyObstructiveThirdPartyCode flag for regex rewriter (#22568) 2022-07-22 08:30:20 -06: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
Lachlan Miller 0e2011d00d chore: fix test by normalizing stdout (#22861)
* chore: fix test by normalizing stdout

* extract util function to avoid side effects during test

* update spec
2022-07-21 10:22:19 +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
renovate[bot] fac83fd451 chore(deps): update dependency semantic-release to v19 [security] (#22238)
* chore(deps): update dependency semantic-release to v19 [security]

* chore: try moving to semantic-release 18

* chore: update jasmine-core to 3.8.0

* chore: update semantic version 19.0.3

* fix: update test to deal with npm obscuring internal error code

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2022-06-27 12:35:58 +10:00
Adam Stone 22d2c31d85 chore: Address skipped specs in server package (#22356)
* chore: Un-skip some tests

* chore: Unskip more tests

* chore: Use exec rather than spawn

* chore: Fix test

* chore: Remove events_spec tests

* chore: Add defaultValue for specPattern option

* chore: Remove default value

* chore: Use os to determine system arch and platform during testing

* chore: Add comment for specPattern defaultValue

* chore: Remove comment
2022-06-27 12:34:51 +10: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
kshastri 4319daa7f4 fix: cypress removes custom status text/reason phrase from http response (#22061) 2022-06-16 14:19:05 -04: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
renovate[bot] 7366add49a chore(deps): update dependency eventsource to v2 [security] (#21639)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-26 16:28:44 +00: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
Bill Glesias a7ecbec2a3 fix: do not allow experimentalSessionAndOrigin to be available in CT … (#21588)
* fix: do not allow experimentalSessionAndOrigin to be available in CT per https://github.com/cypress-io/cypress/issues/21573

* remove experimentalSessionAndOrigin config as it is read only

* move runner session tests under own system test project to turn on experimentalSessionAndOrigin flag

* refactor session ui runner tests to point to runner-session-e2e-specs folder

* fix cypress_spec.js to account for experimentalSessionAndOrigin options

* remove experimentalSessionAndOrigin from env args
2022-05-23 13:55:15 -04: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