Commit Graph

1521 Commits

Author SHA1 Message Date
Azvya Erstevan c20b242ac6 misc: allow HiDPI Screen running wayland to use cypress window/browser (#29366)
* misc: allow HiDPI Screen running wayland to use cypress window/browser

* Added changelog entry

* Fix changelog entry release date to pending

* Changed release changelog entry to actual date

* Added issue number to the changelog entry

* fix tests

* update changelog

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-08-13 10:37:26 -04:00
Jennifer Shehane 0fec07bf71 fix: remove IE code that is calling deprecated unload event (#29944)
* fix: remove IE code that is calling deprecated unload event

* Add changelog entry

* Add new logic around checks on whether to add unload handler

* missing important things here

* revert previous changes

* patch with new reqs for edge

* commit missing line

* Put back some code

* Update cli/CHANGELOG.md

* build binary to test fix

* update workflow
2024-08-07 13:40:01 -04:00
Cacie Prins eecaaf72b8 fix: Stream monitor behavior on failed and stalled upload attempts (#29959)
* fix: rethrow stalled network request error correctly

* no longer timeout from stream monitor on failure to start - allow OS to handle

* changelog

* fix system error detection

* fix test for system error throw

* Update cli/CHANGELOG.md

* Update packages/server/test/unit/cloud/network/put_fetch_spec.ts

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

* rm noop try-catch

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
2024-08-07 10:05:56 -04:00
Mike McCready d8884e0a34 misc: update postinstall cypress open instructions (#29957)
* misc: update postinstall cypress open instructions

* add spacing line

* prepend dashes to command list

* update semver for change

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-08-02 15:40:41 -04:00
Mike McCready 6c3e11f7b6 chore: use ISO 8601 format in cli test timestamps (#29969) 2024-08-02 15:01:58 -04:00
Mike McCready 63d6cdd290 docs: clarify cli manual build instructions (#29965) 2024-08-02 10:14:07 -04:00
Bill Glesias d1e340d19f chore: update changelog to correct release date retroactively (#29948) 2024-07-31 11:26:17 -04:00
Matt Schile dddd2d55d3 perf: remove listener to fix log memory leak (#29939)
* fix: remove listener to fix log memory leak

* updating changelog
2024-07-30 12:28:28 -04:00
renovate[bot] f4052f1f01 dependency: update dependency chrome-remote-interface to v0.33.2 (#29932)
* fix(deps): update dependency chrome-remote-interface to v0.33.2

* changelog entry

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-07-30 11:39:35 -04:00
Bill Glesias 42b3f6e137 chore: release 13.13.2 (#29937) 2024-07-30 09:59:02 -04:00
renovate[bot] 0d5065a106 dependency: update dependency strip-ansi to v6.0.1 (#29931)
* fix(deps): update dependency strip-ansi to v6.0.1

* changelog entry

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-07-29 14:54:06 -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
renovate[bot] 3df6bdb491 dependency: update dependency mime to v2.6.0 (#29870)
* fix(deps): update dependency mime to v2.6.0

* fix(deps): update dependency mime to v2.6.0

* changelog

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-07-26 12:14:19 -04:00
Bill Glesias 1521399bc8 fix: allow yarn 4 berry to work with cypress webpack preprocessor (#29901)
* fix: make sure string_decoder is shipped with wbip

* fix: remove pnp-webpack-plugin as it isnt needed with webpack 5

* chore: update enhanced-resolve to 5.17.0 in the yarn-lock and remove the need for you 5.15 patch as the issue we were patching was fixed in 5.16

* build binary [run ci]

* resolve to process lib installed by cypress and not the users home directory

* add changelog entry [run ci]

* build binaries [run ci]

* add binary system test

skip system test install for yarn 4 as it is an exception case [run ci]

adapt dep installer to handle yarn 4.1.1 [run ci]

rebase this out [run ci]

try this [run ci]

temp [run ci]

* update circle cache [run ci]

* fix conditional for yarn install [run ci]

* Update system-tests/projects/yarn-v4.1.1-pnp-dep-resolution/README.md

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

* update from yarn 4.1.1 to 4.3.1

* update docker image name

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-07-25 14:29:12 -04:00
Jennifer Shehane a09220278c chore: Fix changelog to correct vesion (#29920)
* Fix changelog to correct vesion

* empty commit
2024-07-25 11:22:02 -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
Bill Glesias 5c9dc77708 chore: release 13.13.1 (#29868) 2024-07-16 12:20:29 -04:00
Cacie Prins 8a48ee7cdf fix: Unhandled "WebSocket connection closed" when CDP connection is unstable (#29830)
* unit and integration tests that reproduce websocket disconnected unhandled exception

* WIP: command queue

* complete command queue and retry refactor

* cri-client changes pass tests; modify certain tests for readability and accuracy

* removes unnecessary logic from command queue, adds unit tests for command queue

* rm unused cdp state - this should be reserved for future refactor

* small edits to cri-client: better error handling, more comprehensive comments

* comment re: queue property

* rearrange cri client member methods for readability

* further edits

* Changelog

* Update cli/CHANGELOG.md

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

* fix continuous retry on close

* split heavier debugs to verbose

---------

Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-07-16 09:46:40 -04:00
Jennifer Shehane 4bc8996568 chore: fix duplicate changelog entry (#29857)
* Fix changelog

* empty commit
2024-07-15 12:19:32 -04:00
Jennifer Shehane 4755bd9012 dependency: Replace jsonlint with json-parse-even-better-errors (#29673)
* dependency: Replace jsonlint with json-parse-even-better-errors

* run on windows

* add changelog entry

* Update changelog entry

* Update changelog entry

* yarn lock

* changelog update + lock
2024-07-12 22:53:00 -04:00
Jennifer Shehane 17fd5976d0 dependency: Update jquery to 3.4.1 (#29837)
* Update jquery to 3.4.1

* refactor use of half scroll pixels with some explanation

* remove layer coords from tests + comment out non-working page& value in chromium

* Fix scrollTo calculation to match previous implementation

* add changelog entry

* patch jquery to use old calculations for width/height to avoid breaking change

* revert scrollTo changes since jquery height/width calc is patched

* Add issue to changelog

* Make it a dev patch since it's a dev dependency
2024-07-12 16:56:12 -04:00
renovate[bot] a901ea332e dependency: update dependency minimatch to v3.1.2 (#29821)
* fix(deps): update dependency minimatch to v3.1.2

* empty commit

* changelog

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-07-12 14:56:38 -04:00
Cacie Prins 3c28109185 fix: non-JSON response body display for upload errors (#29801)
* WIP - system test snapshots

* bolster error output for response body potential on upload network errors

* edit error output for readability

* changelog

* Update packages/server/lib/cloud/artifacts/upload_artifacts.ts

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

* fix partial rename

* fix system test for single upload error vs aggregate

---------

Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-07-12 14:52:40 -04:00
Bill Glesias 9a7e59dc92 fix: do not attempt to reify snapshots in the primary if protocol is enabled and no tests are kept in memory (#29828)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-07-11 15:22:02 -04:00
Cacie Prins 5f2236e6cc fix: do not re-use readstreams when retry an upload of the test replay recording (#29745)
* custom async retry for any async fn

* "proxied" fetch for PUT, throwing http errors

* cleans up put_fetch return types & parsing

* move protocol upload logic to put_protocol_artifact, rm upload_stream

* changelog

* changelog

* manually fix wsp in snapshot

* reorganizes a little, properly tests retryable logic

* removes 408 as a non-retriable error in unit test

* make expectation to be resolved more clear

* rm unnecessary type coercion

* changelog

* Update cli/CHANGELOG.md

* asyncRetry only throws Aggregate errors if there is more than one attempt

* Update packages/server/test/unit/cloud/network/is_retryable_error_spec.ts

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

* Update packages/server/test/unit/cloud/network/is_retryable_error_spec.ts

---------

Co-authored-by: Matt Schile <mschile@cypress.io>
2024-07-08 09:30:05 -04:00
Cacie Prins 10f90f9543 chore: release 13.13.0 (#29781) 2024-07-01 09:55:51 -04:00
renovate[bot] c2473c092b dependency: update dependency launch-editor to v2.8.0 (#29770)
* fix(deps): update dependency launch-editor to v2.8.0

* changelog entry

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-28 15:05:26 -04:00
Bill Glesias f2554f12d6 feat: add Angular Signals CT Harness for Angular 17.2 and up for users to be able to use Angular Signals within their component tests (#29621)
* direct copy paste of angular npm package to angular18 (no changes)

* feat: implement angular-signals test hardness to support angular signals

add changelog entry and build binary [run ci]

rename angular18 to angular-signals until we are able to merge back into core package [run ci]

fix linting job [run ci]

make sure angular-signals harness is copied to cli after build [run ci]

add project fixture directory to angular 18 and build binaries for newly named branch

run ci

update cache [run ci]

bust nx cache [run ci]

bust cache on linux [run ci]

try busting the cache... again [run ci]

usually helps when you have the correct build output... [run ci]

fix issue where component internal props were getting blown away when user would not set prop in componentProperties [run ci]

* update test harness description

* add built-in control flow tests with signals

* make sure to clean up rxjs observables in order to prevent a memory leak

* address comments from code review

* yarn lock

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-28 13:37:54 -04:00
renovate[bot] db6afb1054 dependency: update dependency memfs to v3.5.3 (#29746)
* fix(deps): update dependency memfs to v3.5.3

* changelog entry

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-26 10:22:07 -04:00
Bill Glesias eee25c3f07 chore: condense bugfix sections and hoist performance section (#29728) 2024-06-24 11:26:04 -04:00
Joost Koehoorn a6b58a8b2f perf: improve performance of experimentalSourceRewriting (#29540)
* perf: improve performance of `experimentalSourceRewriting`

This change is in addition to https://github.com/benjamn/recast/pull/1399. This commit
focuses on Cypress' use of recast, with the following optimizations:

1. Avoid printing the source file again if no change was made.
   Printing an AST using recast does reuse the original text, but identifying
   for which parts of the AST reuse is possible comes with noticeable overhead.
   By tracking changes within the visitor it becomes possible to skip this
   phase entirely if no changes were made.
2. Avoid a scope lookup (`path.scope.declares(node.name)`) for all identifiers in
   the program, doing it only for identifiers that may have to be rewritten.

With these changes, a 2.6MB bundle that does not need rewriting has improved
from 4.4s to 2.3s, provided that the above-mentioned recast PR has been applied.

* chore: move `experimentalSourceRewriting` release note to pending release section

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-21 15:24:42 -04:00
Bill Glesias af2b764815 fix: chrome missing CRI client after browser relaunch (#29663)
* reprod browser cri crash chrome

* commit with the fix

* Add integration-like test that verifies the browser is launched with the correct arguments [run ci]
2024-06-21 13:27:06 -04:00
Bill Glesias 8217fdcd14 fix: add remote.active-protocols argument and set it to 2 to enable CDP (#29720) 2024-06-21 11:37:09 -04:00
Mike McCready 54127e3c61 dependency: update tmp to 0.2.3 (#29696)
* dependency: update tmp to 0.2.3

* Update changelog

* Update cli/CHANGELOG.md

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Matt Schile <mschile@gmail.com>
2024-06-20 17:03:27 -04:00
renovate[bot] 077c64f1d7 dependency: update dependency ws to v5.2.4 [security] (#29698)
* chore(deps): update dependency ws to v5.2.4 [security]

* empty commit

* add changelog entry

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-19 14:30:05 -04:00
Matt Schile 54a636ea45 chore: release 13.12.0 (#29701) 2024-06-18 12:49:18 -04:00
Vladyslav Nosal 9c9bf5b690 fix: "type" action with {upArrow} and {downArrow} arguments to simula… (#29636)
* fix: "type" action with {upArrow} and {downArrow} arguments to simulate native behavior of input[type=number]

* Add changelog entry for the fix

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-18 10:47:04 -04:00
renovate[bot] 31d4a990f1 dependency: update dependency firefox-profile to v4.6.0 (#29662)
* dependency(deps): update dependency firefox-profile to v4.3.2 🌟

* Add changelog entry

* fix(deps): update dependency firefox-profile to v4.6.0

* add changelog entry

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-13 10:52:53 -04:00
Bill Glesias ee3ff8820a chore: update vite to version 5 inside the monorepo (#29617)
* chore: update babel to latest in packages and update vite to version 5, vite related vue plugins to version 5, and svg plugin to v5

update vitejs react to v5

updated vite plugins

updates unplugin-vue-components and unplugin-icons for vite

remove vite-plugin-copmponents as it is the same thing as unplugin-vue-components

update vue-i18n from beta package to released v9

get unplugin-vue-i18n to latest

add @babel/types to no rewrite [run ci]

fix typing errors [run ci]

* update snapshot [run ci]

* coerce type for compiled messages to bridge type compatibility between unplugin-vue-i18n and vue-i18n [run ci]

* chore: update babel to latest in packages and update vite to version … (#29634)

* fix vite

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

---------

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>

* update other hard coded @babel/core

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-12 16:51:50 -04:00
renovate[bot] 526eedd2f0 dependency: update dependency url-parse to v1.5.10 (#29650)
* fix(deps): update dependency url-parse to v1.5.10

* changelog

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-12 11:19:49 -04:00
Scott O'Hara 33272fb9b5 fix: Improve detection of programmatic scrolls to avoid unintended disabling of auto scrolling (#29574)
* fix: Improve detection of programmatic scrolls to avoid unintended disabling of auto scrolling

* Fix changelog

---------

Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-11 14:33:32 -04:00
Emily Rohrbough 5c3a8dc7fc fix: [protocol] throw error verifying sig (#29603)
* [protocol] throw error verifying sig

Not throwing is surfacing as an upload error when it's a download error.

* adds system test snapshot for invalid signature

* changelog

* pending

* Update cli/CHANGELOG.md

---------

Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-11 14:18:15 -04:00
Cacie Prins cec7a1b098 misc: receive afterSpec durations from app capture code, and report them to the Cloud API (#29500)
* misc: report protocol capture afterSpec duration to cloud

* WIP: collecting afterSpec durations, TODO: system test scaffolding

* push all afterSpec timings to cloud

* push afterSpecTotal instead of afterSpec property

* changelog

* fix trailing slash in readme

* fix afterspec duration unit test

* correct return signature of afterSpec; add debug

* changelog

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

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

* Update packages/server/lib/cloud/protocol.ts

* fix ts check

* fix unit tests re: expected afterSpec sig

* fix return sig of protocol afterSpec stub for system tests

* use env var directly in tests for capture error codepath, rather than override var

* rm unused param

* bump cache

* changelog

* remove pending runnables duration from afterspec report

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-11 13:31:54 -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 cceea03864 feat: add CT support for angular 18 (#29584)
* feat: add CT support for angular 18

* chore: update system test for angular 17 to use released version [run ci]

* chore: add ignore engines for system test install until Electron 29 update is finished

* empty commit to run ci

* fix changelog

* fix changelog
2024-06-07 12:19:02 -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 09c6876637 chore: release 13.11.0 (#29615) 2024-06-04 14:16:38 -04:00
Jennifer Shehane e79089136d feat: add option to ignore chrome preferences (#29447)
* feat: add option to ignore chrome preferences

* build binary on this branch

* adds explanation comment and test

* update changelog from dev

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

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

* put disableRestorePagesPrompt back in promise list in browser open

* Update cli/CHANGELOG.md

* ensure we skip writing to chrome prefs when env is set

* changelog update

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

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

* more fully ignore chrome preferences when env var is set

---------

Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
2024-06-04 10:17:06 -04:00
Scott McGinness 4ccdd860ea misc: Add generic types to net-stubbing for use in intercept and wait (#29508)
* misc: Add generic types to net-stubbing for use in intercept and wait

* misc: Add changelog entry (#29507)

* misc: Revert to `any` for Interception type of multiple waits (#29507)

The nested types were apparently not supported (as written) before TypeScript ~4.1.Remove them in favour of just using `Interception<any, any>` in this overload of `wait`.

* misc: Move changelog entry (#29507)

---------

Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-03 17:25:54 -04:00
Cacie Prins 687eb6029f fix: Launchpad perpetual loading state, in certain circumstances (#29597)
* fix: refetch current project on geometric delay in Main.vue if config has not yet loaded

* adds test for config file load behavior in Main.vue

* changelog

* fix extraneous refetches when config is in error state

* Update packages/launchpad/src/Main.vue

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

* Update packages/launchpad/src/Main.vue

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

* Update cli/CHANGELOG.md

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

* Update packages/launchpad/cypress/e2e/project-setup.cy.ts

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

* Update packages/launchpad/cypress/e2e/project-setup.cy.ts

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

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2024-06-03 15:54:39 -04:00