Commit Graph

201 Commits

Author SHA1 Message Date
Cacie Prins
7825936902 chore(dep): upgrade cypress/request to 3.0.9 to address form-data vulnerabilities (#32096)
* chore(deps): upgrade @cypress/request

* changelog
2025-07-24 15:10:57 -04:00
Bill Glesias
40c81d0ec8 fix: proxy spec flake in firefox due to improper sweeping and correlation (#31651)
* fix: don't automatically remove requests when cdpRequestWillBeSentReceivedTimestamp is set to 0. Also, do not ass hashes to prerequest url as the urls do not have hashes when coming through the middleware

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-24 15:33:38 -04:00
renovate[bot]
b07ea0e988 chore(deps): update dependency devtools-protocol to v0.0.1459876 (#31708)
* chore(deps): update dependency devtools-protocol to v0.0.1459876

* empty commit

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
2025-05-14 11:03:59 -04:00
Bill Glesias
9934910a69 fix: rewrite top.window.location as self.window.location. This is done under modifyObstructiveCode flag (#31688) 2025-05-13 23:58:00 -04:00
renovate[bot]
f35da771c8 dependency: update dependency @cypress/request to ^3.0.8 (#31311)
* fix(deps): update dependency @cypress/request to ^3.0.8

* add changelog entry

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-03-18 12:36:57 -04:00
Ryan Manuel
0daf7e639f chore: support studio lifecycle in protocol (#31239)
* update url with studio params

* updates

* spec updates

* adding tests

* updating changelog

* skip adding visit log during start

* update url support

* cy origin tests

* fix tests

* updates

* update origin test

* chore: support studio lifecycle in protocol

* merge changes

* fix types

* fix tests

* fix tests

* fix tests

* fix more tests

* fix more tests

* fix more tests

* fix test

* fix bugs

* fix tests

* attempt to fix test

* further fixes

* improve cloud studio enablement

* refactoring

* remove new dom link

* fix last test

* Update packages/app/cypress/e2e/studio/studio.cy.ts

* Update packages/server/lib/project-base.ts

* Update packages/proxy/lib/http/request-middleware.ts

Co-authored-by: Matt Schile <mschile@cypress.io>

* PR comments

* fix build

* fix build

* update

* Update packages/server/lib/project-base.ts

Co-authored-by: Matt Schile <mschile@cypress.io>

* fix unit test

* rework save logic

---------

Co-authored-by: Matthew Schile <mschile@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-03-13 20:30:29 -05:00
Bill Glesias
5da0995531 feat: implement webdriver BiDi for Firefox versions 135 and greater (#30870)
* feat: implement BiDi automation client base (without full extension cutover). [run ci]

* chore: implement suggestions from code review. [run ci]

* update error text to be in line with documentation

* address comments from code review

* address comments from code review

* make bidi, cdp, and both active protocols object enumerations to make the code easier to read

* address additional comments from code review

* fix errors from refactor

* update firefox warning
2025-02-24 13:17:44 -05:00
Ryan Manuel
2dce6d5831 chore: add logic to dynamically load studio functionality (#31033)
* chore: add logic to dynamically load new studio functionality

* fix types

* fix tests

* fix

* fix tests

* fix tests

* additional changes to lock things down

* clean up code

* Update guides/studio-development.md

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* Update protocol-development.md

* additional headers

* PR comments

* Update packages/server/lib/cloud/api/get_app_studio.ts

Co-authored-by: Matt Schile <mschile@cypress.io>

* Update packages/app/vite.config.mjs

* update studio/protocol development guides

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Matt Schile <mschile@cypress.io>
2025-02-14 14:54:15 -06:00
renovate[bot]
d733b86a71 dependency: update dependency @cypress/request to ^3.0.7 (#31063)
* fix(deps): update dependency @cypress/request to ^3.0.7

* empty commit

* add dep to changelog

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-02-11 10:43:10 -05:00
Jennifer Shehane
f920dcbd0d chore: enforce 'no-implicit-dependencies' on tslint (#31022)
* chore: enforce 'no-implicit-dependencies' on tslint

* downgrade chalk version for errors package
2025-02-06 17:33:05 -05:00
renovate[bot]
c1390bffd8 chore(deps): update dependency devtools-protocol to v0.0.1413303 (#30986)
* chore(deps): update dependency devtools-protocol to v0.0.1413303

* empty commit

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-01-31 12:52:06 -05:00
Jennifer Shehane
92e428a357 chore: add type linting + compilation checks to packages (#30776)
* chore: add type linting + compilation checks to runner package

* empty commit

* A bunch of tslint fixes

* wow it is building

* Fix issue with CT not mounting correctly with comments within it

* Fix net-stubbing.ct.ts failures

* Fix tslint: disable comment

* move target into compilerOptions

* fix tslint disable comment

* update proxy-logging to undo changes

* standardize the tslint:disable comments

* fix comment

* fix the banner content not displaying and write a test for this situation

* fix ct reference

* put target to es2020

* actually set the property with replaced title

* Update packages/reporter/src/hooks/hook-model.ts

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Fix eslint/tslint settings for system-tests with vue 3

* bump CI cache

* update types/react resolution

* add return

* lint fix

* tslint disable for empty blocks

* exclude dist files from ts linting

* update to exclude all dist folder

* exclude dist file

* change to await

* fix line numbers of stack trace with linting updating vue file

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2025-01-23 14:55:52 -05:00
Cacie Prins
0547d65a2a breaking: no longer inject document.domain by default (#30770)
* remove experimentalSkipDomainInjection, add and deprecate injectDocumentDomain

* remove experimentalSkipDomainInjection, add injectDocumentDomain

* begin rethreading domain injection

* complete document domain transition

* move some cookie specs to separate test run

* origin and privileged commands with default docdom inject

* fix privileged channel when injecting document domain

* rm unnecessary .getOrigin abstraction in cors lib

* move remote-states in prep for refactor Replace Conditional with Polymorphism

* refactor remote states to strategy pattern

* cookie commands work as expected w cross origin bridge on different origins

* some origin tests updated

* run tests with document domain enabled

* run tests actually

* use correct config, swap conditional

* check-ts

* inject documetn domain for webkit tests

* do not exec injectDocumetnDomain in parallel

* fix ServerBase construction in tests to include cfg now

* pass cfg to ServerBase

* improved integration tests

* remove document domain checks for all server integration specs - will add injectDocumentDomain cases

* tests for injecting document domain when configured to

* square away server integration tests

* ensure cookies are set correctly, potentially

* errors pkg snapshots

* fix config tests

* fixing config tests

* somewhat improves tests for cors policies in packages/network

* fix ts err in server-base

* enable injectDocumentDomain for cy in cy tests

* fix Policy type ref

* refactor cypress-schematic ct spec to be less prone to timeouts

* run vite-dev-server tests with injectDocumentDomain

* rm document domain assertion from page_loading system test

* add system tests that test with injectDocumentDomain and others that test with cy.origin

* fix results_spec snapshot

* update experimentalSkipDomainInjection system test

* different behavior for certain net_stubbing tests based on injectDocumentDomain or not

* fix ts

* extract origin key logic from remote states, for now

* move server-base and response-middleware over to new pattern

* WIP - reentry

* fix build, remove console.log

* check-ts

* fix spec frame injection

* remove injection for localhost

* mostly fix vite-dev-server app integration tests

* fix codeframe in certain cases in chrome

* drop internal stack frames from stacks intended for determining code frame data

* some improvements to vite ct error codeframes

* fix proxy unit tests to use document domain injection util class

* rm .only

* fix all vite ct error specs

* rm console.log

* slight refactor to util class to make easier to test

* fix refactor - missing rename in files.js

* several tests do not set testingtype in config, so just check against component instead of checking for e2e

* revert changes to getInvocationDetails to see if that breaks tests

* re-enable stack stripping in invocation details for chrome

* new snapshots with more accurate invocation details

* test for same-site cross-origin cookie behavior

* ignore window.top ts errors

* revert forcing injectDocumentDomain in vite-dev-server cy config

* fix normalized whitespace for firefox "loading_failed" error

* always trim trailing wsp from stack before appending additional content

* force normalization of whitespace to three \n when adding additional stack details

* normalize wsp between stack and additional stack to "\n  \n" in firefox

* remove stack_utils attempt at normalizing wsp

* various cleanup: remove commented console logs, add more detailed comments

* add on links to error messages

* remove experimentalSkipDomainInjection from exported type defs

* Update system-tests/test/experimental_skip_domain_injection_spec.ts

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

* Update packages/driver/cypress/e2e/e2e/origin/cookie_misc.cy.ts

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

* no need to coerce a boolean value to a booleanc

* export base config from primary cypress config in driver for use in inject-document-domain test subset

* lift experimentalSkipDomainInjection breaking option to root

* rollback config/options changes

* rm invalid comment

* use hostname instead of origin to create cookie from automation cookie

* clarify stack regex in results_spec

* lint

* take a stab at the changelog entries for this

* Update cli/CHANGELOG.md

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Update cli/CHANGELOG.md

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* reenable locally-failing test

* changelog

* snapshot updatesfor experimental skip domain injection err msg

* remove packageManager declaration in package.json

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2025-01-06 13:48:43 -05:00
Jennifer Shehane
0e5b131b46 dependency: bump cypress/request dependency (#30488)
* dependency: bump cypress/request dependency

* changelog entry
2024-10-30 09:08:14 -04:00
Bill Glesias
eed699eb6d chore: update lerna to 8.1.8 from 6.6.2 (#30436)
* fix sync script with updateds npm-packlist

* chore: update lerna from 6.6.2 to 8.1.8 and ran lerna repair

* chore: pin typescript to ~5.4.5 to avoid importsNotUsedAsValues that was removed in 5.5 and edit workflows and scripts to correctly scope learna packages on v8 snapshot tests [run ci]

* fix indentation in comments

* remove console.log reference to print current package directory in sync exported npm with cli script
2024-10-22 14:46:46 -04:00
Jennifer Shehane
0a15c8d2cc dependency: bump @cypress/request to ^3.0.4 (#30194)
* empty commit

* dependency: bump cypress/request

* add changelog entry
2024-09-10 12:29:25 -04:00
renovate[bot]
d067b7ed4b chore(deps): update dependency devtools-protocol to v0.0.1346313 (#30112)
* chore(deps): update dependency devtools-protocol to v0.0.1346313

* empty commit

* patch updated types for our devtools-protocol version

* dev patch

* Revert "dev patch"

This reverts commit 031b00df5f.

* Revert "patch updated types for our devtools-protocol version"

This reverts commit 44b31a3414.

* try to set devtools-protocol resolution

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-09-05 14:06:35 -04:00
Mikhail
82601500b6 perf: optimize parseCspHeaders (#29887)
* fix: optimize parseCspHeaders

* Added changelog notes

* Fix changelog

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-07-26 15:23:51 -04:00
Mike McCready
767ddf8584 dependency: update @cypress/request to 3.0.1 (#29864)
* dependency: update @cypress/request to 3.0.1

* move changelog entry to next version

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-07-25 11:01:21 -04:00
BernardoSousa03
ec1d7994dd fix: HTTP response with invalid headers doesn't throw error #28865 (#29420)
* fix: HTTP response with invalid headers doesn't throw error #28865

When receiving the described HTTP response Cypress resets the headers.
This would cause the validateHeaderName method from node to be called
which would cause an error, since the headers where invalid.
Now Crypress verifies all the headers before reseting them,
discards invalid ones and sends a warning in the console
when debug module is on.

* fix: improved warning display to the command line

When cutting off invalid headers from the response the user
is informed of such headers in the command line

* fix: added undefined verification and catched missing error

Fixed a typescript error where validateHeaderValue was being called
with value possibly being undefined. Fixed catching missing error
where code is 'ERROR_INVALID_CHAR' and rethrows other errors

* Update cli/CHANGELOG.md

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2024-06-11 13:13:34 -04:00
Bill Glesias
f3b67666a5 fix: update cypress to Typescript 5 (#29568)
* fix: update the monorepo to typescript 5

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* run ci to see problems [run ci]

* update vue-tsc and typings that conflict with update

* regen snapshot

* fix typescript errors ui test as stack trace behavior has changed

* fix server unit tests

* update cy.origin() spec based on stack traces and code frames

* update spec to include source map url

* run ci

* fix check-ts

* chore: fix system tests [run ci]

* add preprocessor tests to batteries included to exercise new logic

* run ci

* refactor unit tests to be a bit more dry

* pin typescript to ~5.4 and adjust config to ignroe deprecations but keep importsNotUsedAsValues

* add changelog entry

* add fixme issue to stack trace mismatches inside evaled context

* use import type webpack as webpack as a lib isn't actually invboked in the runner webpack config

* fix system test as adding 4 lines of comments impacts the stack trace line 4 lines (duh)

---------

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
2024-06-04 19:17:38 -04:00
Bill Glesias
6937190084 chore: update browser internal images to chrome 124 and firefox 125 (#29391)
* chore: update browser internal images to chrome 124 and firefox 125 [run ci]

* update screenshot sizes for chrome as they have changed in the chrome 124 and is ultimately out of our control since the options passed into the CLI are STILL not respected [run ci]

* fix cypress-in-cypress tests for chrome 119 and up

* remove windows app integration code added in 29198

* run windows build [run ci]

* fix some failing system tests [run ci]

* update non proxied png [run ci]

* fix system tests failing [run ci]

* fix afterEach [run ci]

* chore: update documentation in response middleware
2024-04-30 14:16:02 -04:00
Bill Glesias
f14a11aecf chore: update eslint from version 7 to version 8 (#29355)
* chore: (for eslint-plugin-dev only is breaking) update eslint-plugin dev minimum to eslint 7. Remove support for coffeescript and reconfigured required peer deps

* correctly configure eslint-plugin-json-format for the monorepo and run linting on all json files (previously was not running)

* properly support no duplicate imports
2024-04-26 14:42:33 -04:00
Matt Schile
867a973dca perf: support activated service worker that is not handling requests (#29349) 2024-04-23 11:52:40 -06:00
Bill Glesias
768afcc5ae chore: move to macstadium intel runner for circle darwinx64 [run ci] (#29300)
* chore: move to macstadium intel runner for circle darwinx64 [run ci]

* update cache and try runner machine version 3 [run ci]

* prevent stop only from failing (maybe we remove this?) [run ci]

* what happens to the dir after job [run ci]

* try this [run ci]

* retrigger x64 job mac [run ci]

* bump cache to verify functionality [run ci]

* bump cache key to trigger full dependency cache [run ci]

* rebump cache while user is not logged in [run ci]

* bump cache to check full rerun [run ci]
2024-04-16 11:52:59 -04:00
renovate[bot]
4d97a0fdb3 dependency: update dependency express to v4.19.2 [security] (#29211)
* chore(deps): update dependency express to v4.19.2 [security]

* empty commit

* dependency: add changelog item

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-04-01 11:47:55 -04:00
Matt Schile
cd4a23fa90 test: fix issue with electron in service-worker.cy.js (#29089) 2024-03-11 11:22:35 -04:00
Matt Schile
a29eae9260 perf: fix performance issue for service workers that don't handle requests (#28900) 2024-03-05 11:24:59 -07:00
Jennifer Shehane
a0b2d1e912 fix: Add existential operators to properties before calling split in processBrowserPreRequest (#28952)
* fix: Add existential operators to properties before calling split

* empty commit

* changelog entry

* Add note about regression

* remove duplicate dep in changelog

* Add link to issue

* Update packages/proxy/lib/http/util/service-worker-manager.ts

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Update packages/proxy/lib/http/util/service-worker-manager.ts

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-02-15 13:29:40 -05:00
Ryan Manuel
9088dc232d fix: issue with service workers in test replay when they're initiated from a support file (#28748)
* fix: issue with service workers in test replay when they're initiated from a support file

* add changelog

* Update cli/CHANGELOG.md

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

* PR comment

* get prerelease

* PR comments

* Update .circleci/workflows.yml

* Update .circleci/workflows.yml

Co-authored-by: Matt Schile <mschile@cypress.io>

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
2024-01-23 12:22:02 -06:00
Matt Schile
c672581a71 perf: fix proxy correlation timeout issues (#28751) 2024-01-22 15:35:49 -07:00
Ryan Manuel
c6f5e9a5c9 fix: ensure that we capture service worker requests (#28517)
* fix: ensure that we capture service worker requests

* add changelog

* fix changelog

* fix tests

* PR comments

* PR comments

* PR comment

* PR comment

* update changelog

* Update cli/CHANGELOG.md

Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>

* enable builds on all archs

* fix permission issue

* PR comments

* Update smoke.js

* Update cli/CHANGELOG.md

* attempt to fix smoke tests

* bump ci cache

* Update smoke.js

* Update smoke.js

* Update example.json

* fix multiple specs

* fix tests

* Update CHANGELOG.md

---------

Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
2024-01-06 15:23:30 -06:00
Matt Schile
7a9e3a4697 perf: don't reset preRequests when test isolation is off (#28642) 2024-01-05 14:52:47 -07:00
Matt Schile
c9062f145e fix: handle malformed URIs in prerequests (#28522) 2023-12-14 09:12:13 -07:00
Matt Schile
57bb0b68ee fix: decode urls in prerequest (#28427) 2023-11-29 15:09:12 -07:00
Chris Breiding
650d5cb7da fix: Ensure basic auth headers are set on extra target requests (#28387) 2023-11-27 16:28:35 -05:00
Chris Breiding
9d9bf25977 fix: Ensure response headers are set for extra target network requests (#28322) 2023-11-13 17:51:51 -05:00
Chris Breiding
a0cfed5044 fix: "bypass" proxying network requests from extra browser tabs/windows (#28188)
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Matt Schile <mschile@cypress.io>
2023-11-02 13:55:13 -04:00
Ryan Manuel
d9606868c5 fix: fix failures and correlation in proxy (#28094) 2023-10-23 16:08:05 -05:00
Ryan Manuel
ff89ffa2b2 fix: proxy issues with service workers and clean up at end of specs (#28060) 2023-10-17 19:53:49 -05:00
Ryan Manuel
ca6d30d7bf fix: force gzip when no accept encoding header is sent and use identity if gzip is not sent (#28026)
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2023-10-17 13:52:37 -05:00
Ryan Manuel
078dc0a81e fix: support proxy correlation timeout notifications and additional proxy data (#27976) 2023-10-10 16:19:37 -05:00
Ryan Manuel
8da1e5c92f fix: correlate prerequests in order instead of reverse order (#27892) 2023-09-27 16:37:16 -05:00
Matt Schile
f8b4c59daa fix: update net stubbing to not intercept requests sent to dev server (#27788) 2023-09-12 08:22:33 -06:00
Ryan Manuel
70248ab9c0 fix: prerequest correlation for various retried and cached requests (#27771) 2023-09-10 21:41:40 -05:00
Chris Breiding
2c8337a913 chore: upgrade @cypress/request-promise to 5.0.0 (#27655) 2023-08-24 11:14:18 -04:00
Chris Breiding
7f45375439 breaking: Upgrade @cypress/request to 3.0.0 (#27495) 2023-08-23 15:16:27 -04:00
Ryan Manuel
43821bf53d feat: handle empty response bodies by communicating them to the protocol from the proxy (#27606) 2023-08-21 19:31:40 -05:00
Bill Glesias
f1b3741a40 Merge pull request #27537 from cypress-io/chore/merge_develop_into_release_13
chore: merge develop into release 13
2023-08-15 17:13:59 -04:00
Ryan Manuel
462ee04df9 feat: enable the protocol to retrieve response bodies from the network proxy (#27462)
Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
fix: do not correlate cached requests in the proxy (#27525)
2023-08-15 13:41:36 -05:00