Commit Graph

1452 Commits

Author SHA1 Message Date
Jennifer Shehane 0e3dfd1169 fix: pass all chromium flags through to Electron (#29443)
* fix: pass all chromium flags through to Electron

* Add changelog entry

* exclude webkit from test for navigator.webdriver being true

* add debug log for switches in electron

* Fix the unit test so it passes now

* Update packages/server/lib/environment.js

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

* Update packages/server/lib/environment.js

Yes 😝 Probably why a better test would be good around this.

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

* Update packages/server/test/unit/util/chromium_flags_spec.js

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

* lint fix

---------

Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2024-05-02 11:38:44 -04:00
Bill Glesias 0bfaa9a615 chore: fix changelog to point to correct PR (#29456) 2024-05-02 11:32:35 -04:00
Cacie Prins fc88764ad5 feat: more informative error messages when Test Replay fails to capture (#29312)
* new error messages

* errors for initialization and capturing test replay

* messaging the case where no protocol instance but also no fatal error

* adds suggested remedies to initialization errors

* differentiation between network and http errors, initial work on db missing error

* improve db not found error

* add new error type to schema

* rm commented dead code

* clean up network error creation in uploadStream

* make artifact confirmation error msg more general

* test display of put instance artifacts failure

* changelog

* ensure we are displaying errors even in quiet mode

* fix pending changelog

* new snapshots for protocol errors

* improve aggregate error

* resolved html error snapshots

* fix check-ts

* fix test

* sanitize temp dir in CLOUD_PROTOCOL_CAPTURE_FAILURE error msg

* changelog

* fix double entry of certain network errors, error message prop for network errors

* fix url arg for network error

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

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

* rm extra formatting from debug

* snapshot whitespace

* changelog update

* +pending

* Update cli/CHANGELOG.md

* resolve snapshots?

* does moving the stack trace fix whitespace in snapshots in ci?

* maybe fixes whitespace on electron now?

* fully normalize stack traces

* remove full normalization

* maybe debug stack normalization

* rm stack traces from error messages

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-05-01 14:32:53 -04:00
Jennifer Shehane cd0cb612dd dependency: bump Electron to 27.3.10 (#29431)
* fix: bump Electron to 27.3.10

* add changelog entry

* do windows builds for good measure

* temporarily set branch to publish binary with updated electron

* Update binary-integrity-check-source.js

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-04-29 17:44:34 -04:00
Bill Glesias 52347d61a1 chore: release 13.8.1 (#29390) 2024-04-23 14:52:43 -04:00
Matt Schile 867a973dca perf: support activated service worker that is not handling requests (#29349) 2024-04-23 11:52:40 -06:00
Akshat Rajvanshi 45cff01df7 misc: ensure 'its' function type excludes null and undefined (#28872) (#28904)
* refactor: ensure 'its' function type excludes null and undefined (#28872)

This fix addresses an issue where the 'its' function could return null or undefined, causing unexpected behavior in certain scenarios. The change introduces a more robust type check to ensure that the returned value is always non-null and non-undefined.

* resolve linting issues related to TypeScript types

* Update changelog

* resolved lint errors

* Update cli/types/cypress.d.ts

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

* Update cli/types/cypress.d.ts

* move to correct changelog entry

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-04-23 12:38:02 -04:00
percytrar c5fa260b86 fix: added validation for timeout for query operations (#29327)
* fix: added validation for timeout for query operations

* fix(changelog): added line break

* fix(err-msgs): added new error msgs for invalid timeout

* fix(err-msgs): added new error msgs for invalid timeout

* fix changelog

* refactor(validate-timeout): moved func to global querying scope

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-04-23 09:29:09 -04:00
Cacie Prins 4e7e3a2e27 fix: websocket closed (tentative) (#29347)
* fix: updates regex for websocket connection error to properly handle

* build binaries for this branch

* do not reconnect if reconnect in progress; treat websocket not connected errors as websocket in closing/closed state errors

* changelog

* fix changelog

* publish prerelease binaries for this branch

* build windows prerelease package

* Update cli/CHANGELOG.md

* Update cli/CHANGELOG.md

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

* add comment for websocket error regex examples

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2024-04-22 15:55:01 -04:00
renovate[bot] e23460cf10 dependency: update dependency zod to ^3.22.5 (#29367)
* fix(deps): update dependency zod to ^3.22.5

* 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-04-22 13:14:47 -04:00
Bill Glesias dd80aedcc7 chore: clean up changelog (#29365) 2024-04-19 10:30:18 -04:00
Bill Glesias 3243850550 chore: release 13.8.0 (#29358) 2024-04-18 15:28:43 -04:00
Jennifer Shehane 9b0abdd612 fix: Update regex for formatting assertion messages to avoid catastrophic backtracking (#29353)
* fix: Revert addition of .* into regex and reformat code to escape early before regex runs

* Add changelog

* fix: Actually fix the problem with the plugin messages

* changelog update
2024-04-18 15:14:26 -04:00
Bill Glesias d7e9d6068c feat: support webpack-dev-server v5 in @cypress/webpack-dev-server (#29306)
* feat: support webpack-dev-server-5 for @cypress/webpack-dev-server [run ci]

* sidestep Forge types installed by webpack dev server [run ci]

* add changelog entry

* remove webpack 4 types

* format changelog

* Update cli/CHANGELOG.md

* Update npm/webpack-dev-server/src/helpers/sourceRelativeWebpackModules.ts

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

* add back in importsNotUsedAsValues and update system test snapshot

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Matt Schile <mschile@cypress.io>
2024-04-18 11:17:04 -04:00
Nikita Barsukov ede4a6fd60 chore: fix incorrect description of cy.clear command (#29339) 2024-04-17 10:26:42 -04:00
Alejandro Estrada 5a8618fad1 misc: capture Semaphore PR number (#29314)
* feat: capture Semaphore PR number

* Update changelog

* Update cli/CHANGELOG.md

* Fix test

* Update cli/CHANGELOG.md

* Update cli/CHANGELOG.md

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Matt Schile <mschile@cypress.io>
2024-04-15 14:24:35 -05:00
Bill Glesias 0e1a49dc46 chore: clean up changelog (#29315) 2024-04-11 17:12:05 -04:00
Bill Glesias 94aad9a4a2 chore: release 13.7.3 (#29310) 2024-04-11 12:47:40 -04:00
tiago80673 1fa3e7f8c6 fix: Fix issue with display of assertions when using custom messages (#29243)
* fix: added optional custom message to regex

* add changelog entry

* Update packages/reporter/cypress/e2e/unit/formatted_message.cy.ts

* moved changelog entry to new cypress version

---------

Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-04-10 17:09:26 -04:00
Cacie Prins 96b14c3e17 misc: suppress benign vulkan warnings (#29278)
* fix: suppress benign vulkan warnings

* changelog; make garbage warnings visible via verbose debug

* update changelog

* bump circle cache

* update regex

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-04-10 13:12:23 -04:00
Erwin 5251d2bb36 fix: launch args with multiple values inside quotes (#29077)
* fix: launch args with multiple values inside quotes

* chore: update change log

* chore: update changelog issue link

* chore: update  changelog prefix

* chore: update change log link

* fix: lint issues

* fix: lint issue

* Update packages/server/lib/environment.js

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

* Update environment.js

* Update cli/CHANGELOG.md

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

* fix: lint issues

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-04-10 09:51:20 -04:00
Ethan Setnik d794f932fe docs: Add link to chromeWebSecurity read more (#29146)
* docs: Add link to chromeWebSecurity read more

* Update cli/types/cypress.d.ts

Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>

---------

Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-04-03 13:15:15 -04:00
Matt Schile bfac3ba205 misc: disable enhanced ad privacy dialog in chrome (#29250) 2024-04-02 17:12:29 -06:00
Bill Glesias dd922a8704 chore: release 13.7.2 (#29249)
* release 13.7.2

* update circle cache as electron is failing install in windows
2024-04-02 12:59:05 -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
Ryan Manuel 1ae7c9ef42 fix: re-initialize DOM subscriptions from a full snapshot on cdp reconnect (#29210)
* fix: re-initialize DOM subscriptions from a full snapshot on cdp reconnect

* add test

* add changelog

* Update cli/CHANGELOG.md

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

* Update CHANGELOG.md

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-03-29 17:04:32 -05:00
David Furey 425ba79e3e fix: Allow option values containing quotation marks to be selected (#29214) 2024-03-29 16:25:05 -04:00
Cacie Prins 3a739f3f4f perf: improve replay upload resiliency (#29174)
* tbd

* workable templated filestream uploader

* clean up async assertions

* upload stream uses activity monitor to detect start timeouts and stalls

* makes uploadStream retryable

* filesize detection, enoent errors, and testable retry delays

* extract fs logic to putProtocolArtifact, impl putProtocolArtifact

* aggregate errors for retryable upload streams

* fixes imports from moving api.ts, uses new upload mechanism in protocol.ts

* use spec_helper in StreamActivityMonitor_spec due to global sinon clock changes

* fix putProtocolArtifact specs when run as a part of the unit test suite

* fix return type of ProtocolManager.uploadCaptureArtifact

* convert from whatwg streams back to node streams

* extract HttpError

* ensure system test snapshots

* changelog

* more changelog

* fix unit tests

* fix api ref in integration test

* fix refs to api in snapshotting and after-pack

* small edits

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

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

* Update packages/server/lib/cloud/upload/uploadStream.ts

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

* camelcase -> snakeCase filenames

* improve docs for StreamActivityMonitor

* added documentation to: upload_stream, put_protocol_artifact_spec

* move stream activity monitor params to consts - no magic numbers. docs.

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

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

* Update packages/server/test/unit/cloud/api/put_protocol_artifact_spec.ts

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

* fix check-ts

* fix imports in put_protocol_artifact_spec

* Update packages/server/test/unit/cloud/upload/stream_activity_monitor_spec.ts

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

* api.ts -> index.ts

* fix comment style, remove confusingly inapplicable comment about whatwg streams

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-03-29 12:22:57 -04:00
Bill Glesias 07fd9abcfa fix: allow users to pass in custom useragent for firefox 124 and up without changes to behavior (#29197) 2024-03-27 14:22:04 -04:00
Lachlan Miller 19075c70cf fix: retain original array after defaultsDeep #27240 (#27312)
* modifying object after array combination to hold older values

* regression test

* made suggested changes

* config defaults

* log

* logs

* log

* log again

* update log

* changelog

* updates changelog

* fix typo and move changelog entry and fix link

---------

Co-authored-by: Nihar Phansalkar <phansalkarnihar@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: AtofStryker <bglesias@gmail.com>
2024-03-25 10:00:06 -04:00
Bill Glesias f17fa4ca60 chore: release 13.7.1 (#29184) 2024-03-21 13:57:14 -04:00
Bill Glesias 9c27c37b06 fix: patch new tab creation for firefox 124 and up to fix issue where… (#29179)
* fix: patch new tab creation for firefox 124 and up to fix issue where cypress was not executing beyond the first spec in cypress run (specific to firefox).

* Update cli/CHANGELOG.md

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

* opt for global window instead of no undef for window reference

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-03-21 13:37:23 -04:00
Matt Schile 75eba1eb6a fix: fixing issue with blurring shadow dom elements (#29125) 2024-03-20 10:54:00 -06:00
renovate[bot] d98fb368aa dependency: update dependency jose to v4.15.5 [security] (#29086)
* fix(deps): update dependency jose to v4.15.5 [security]

* bump jose

* Add changelog entry

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-03-13 17:07:08 -04:00
Cacie Prins 5503dd6078 chore: release 13.7.0 (#29123)
* chore: release 13.7.0

* fix incorrect regression note in changelog

* Update cli/CHANGELOG.md

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

* changelog entries for #28986

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Matt Schile <mschile@cypress.io>
2024-03-12 17:13:22 -04:00
Mike McCready 82536133a7 misc: use pnpm add for ct dependency scaffolding (#29056)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-03-12 12:59:54 -04:00
Bill Glesias 7a7a28f9d6 feat: Support shadow DOM recursive selectors inside cypress snapshots sent to protocol (#28823)
* chore: support new protocol structure for shadow DOM elements

* chore: capture scroll events inside shadow DOM that occur on shadow element scroll containers

* ignore scroll event listener test in webkit as fixture that uses CSSStyleSheet to help create scrollbox throws illegal constructor

* change structure of capture to be array of strings and assume shadowDom traversal similar to axe-core [run ci]

* fix issue where closed shawdow doms were causing application to crash [run ci]

* add actionability tests for protocol. Add synthetic input events in order to capture nested shadow DOM inputs

* build binary [run ci]

* remove actionability from driver [run ci]

* add changelog entry for feature, add serialization comments

* address comments from code review [run ci]

* remove unreachable code

* remove additional dead code

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-03-12 12:29:55 -04:00
BaboonKing 854a6497be feat: supported type of vue@2.7+ (#28818)
* feat: supported type of vue@2.7+

* chore[build]: respectExternal back to false for vue2 in dts

* 更新 rollup.config.mjs

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

* updating changelog

* updating link

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
2024-03-12 10:57:36 -04:00
Jennifer Shehane d55659c3c6 misc: update command message to truncate command info at 100 lines instead of 50 (#29032)
* misc: update command message to not truncate command info

* Just double the lines displayed

* changelog

* Update cli/CHANGELOG.md

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

---------

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2024-03-11 15:24:18 -04:00
Bill Glesias 3383043c81 misc: capture the beforeTest timestamp in the app before sending it to protocol for a more accurate timestamp (#29061)
* chore: capture the beforeTest timestamp in the app before sending it to protocol for a more accurate timestamp [run ci]

* add change entry
2024-03-11 08:54:41 -04:00
renovate[bot] adbefb6d8d dependency: update dependency jimp to v0.22.12 (#29055)
* fix(deps): update dependency jimp to v0.22.12

* changelog entry

* empty commit

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* remove reference to files that no longer exist

* Remove 'regeneratorRuntime' from allowList, this must have been removed from jimp

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
2024-03-08 17:39:28 -05:00
Cacie Prins e78531820a fix: screenshot() times out when the main Cypress tab is not focused (#29038)
* activate main cypress tab before taking a screenshot

* new tests to cover page activation behavior

* updates changelog

* whitespace

* fix check-ts

* reduce extension failure timeout to 500ms to account for origin bridge timeout

* only use tab activation workaround in chrome; default to Page.bringToFront in headless mode

* update unit tests

* swap order of tests in 5016 system test

* some debugging to try and hunt down firefox issue

* rm debug prev added - looks like sys test passed that time?

* rm debug emit from v2 extension
2024-03-08 11:09:41 -05: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
renovate[bot] cdd7a7e10c dependency: update dependency signal-exit to v3.0.7 (#28979)
* fix(deps): update dependency signal-exit to v3.0.7

* Remove signal-exit - this is not used

* empty commit

* fix(deps): update dependency signal-exit to v3.0.7

* Update changelog

* Update cli/CHANGELOG.md

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-03-01 13:02:27 -05:00
Andrii Chubatiuk 96362b49c1 dependency: upgraded http-proxy-middleware (#28902)
* fix: upgraded http-proxy-middleware

* add changelog entry

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-02-29 15:24:30 -05:00
Teo Anastasiadis 5d42406610 fix: Disabled elements being clickable (#28807)
* fixes #28788 -- mouse.ts logic
If mouseUp element or mouseDown element or commonAncestor element is :disabled, click event should be prevented

* fixes #28788 -- e2e test
tests that no click events are registered when click happens on child of disabled element

* fixes #28788 -- mouse.ts logic
If mouseUp element or mouseDown element have an "actually disabled" parent, the click event should not be registered

* refactoring: minor name changes for readability

* fixes #24322 --added changelog entry

* Update packages/driver/src/cy/mouse.ts

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

* Update packages/driver/cypress/e2e/commands/actions/click.cy.js

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

* Update packages/driver/src/cy/mouse.ts

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

* Update packages/driver/src/cy/mouse.ts

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

* update mouse.ts -- unexpected token

* docs: moved entry to 13.6.5

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update packages/driver/cypress/e2e/commands/actions/click.cy.js

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

* Update cli/CHANGELOG.md

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

* lint: fixed 2 linting errors

565:1  error  Expected indentation of 8 spaces but found 10  indent
567:7  error  Expected blank line before this statement      padding-line-between-statements

* style: removed trailing space

567:1  error  Trailing spaces not allowed  no-trailing-spaces

* Update CHANGELOG.md

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
2024-02-27 11:51:44 -05:00
Teo Anastasiadis 3e5fabce2c fix: Boolean and null literals should be considered valid request bodies (#28835)
* fix(types): RequestBody type should be able to accept booleans and null values, which are all valid JSON literals

* refactor: boolean literals are valid JSON objects. Null values should also be considered valid when explicitly passed to the request function.

* refactor: body is explicitly defined when passed as positional argument or when supplied through the options object

* test: JSON literals should be parsed as valid JSON and set json=true

* docs: issue reference

* fix: boolean and null literal should be send to request promise as strings

* docs: fixes #28789 -- added issue reference

* test: tests proper conversion of JSON literals to strings.

* docs: added isssue reference

* docs: fixes #28789 -- changelog entry

* refactor: change isValidJsonObj to isValidBody

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

* refactor: change isValidJsonObj to isValidBody

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

* refactor: use lodash utils

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

* Update cli/CHANGELOG.md

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

* docs: moved entry to 13.6.5

* docs: fixed changelog entry

* Update CHANGELOG.md

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-02-23 16:11:18 -05:00
Bill Glesias 9dfb38f574 chore: release 13.6.6 (#28996) 2024-02-22 14:43:59 -05:00
Bill Glesias c1304b2775 fix: avoid ANSI character output when running the binary smoke test f… (#28994) 2024-02-22 14:29:49 -05:00
Bill Glesias 3a8f830228 chore: bump changelog and package.json version (#28978) 2024-02-20 13:28:49 -05:00