Commit Graph

213 Commits

Author SHA1 Message Date
Ryan Manuel
ffcc6387ef chore: add ability to load types from the studio bundle (#31153)
* chore: set up sharing of react via module federation in studio

* chore: add ability to load types from the studio bundle

* fix build

* fix build

* fix build

* PR comments

* Update guides/studio-development.md

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

* fix test

---------

Co-authored-by: Matt Schile <mschile@cypress.io>
2025-02-28 16:30:45 -06:00
Jennifer Shehane
a5a343bcdc chore: remove warning from webpack:runner about version import (#31170) 2025-02-27 16:07:49 -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
017750810e chore: set up sharing of react via module federation in studio (#31129)
* chore: set up sharing of react via module federation in studio

* PR comments
2025-02-24 10:51:14 -06: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
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
Bill Glesias
5e7982d3d0 chore: automatically infer cypress major version from package.json version and error when no splash page exists for said major version (#30911) 2025-01-22 16:21:57 -05:00
Bill Glesias
49d578c5c7 chore: make sure the constant for the welcome screen is patched (#30893) 2025-01-16 13:43:48 -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
636bed9cf7 merge develop 2024-12-02 09:42:47 -05:00
Bill Glesias
15c5761eb6 breaking: make JustInTimeCompile GA from experimentalJustInTimeCompile and default to true (#30641)
* pull support for JIT from vite since it doesn't have an affect for end users or performance (webpack only) [run ci]

rebase this

* remove the experimentalJIT flag and make it GA (default still false) [run ci]

* enable justInTimeCompile by default [run ci]

* chore: bump cache [run ci]
2024-11-21 15:25:59 -05:00
Alex Schwartz
82f45c51d6 feat: added ability to specify the default browser in cypress config (#30517) 2024-11-14 12:49:32 -07:00
Ryan Manuel
0975b2f07f feat: update the protocol to be able to flex logic based on project config (#30594)
* feat: update the protocol to be able to flex logic based on project config

* slight refactor

* Update cli/CHANGELOG.md

* Update packages/types/src/protocol.ts

* fix ts
2024-11-13 15:42:11 -06:00
Jennifer Shehane
0aa73c44d5 breaking: remove logic around min supported browsers (#30462)
* remove logic around min supported browsers

BREAKING: remove logic around min supported browsers

* changelog entry

* forgot to save some changed files

* update broken tests

* remove another test testing unsupported browsers

* Add back logic for browser validator

* return if validator is undefined

* update called browser

* fix failing tests

* fix logic of unsupported showing

* add parens
2024-11-01 11:04:00 -04:00
Ryan Manuel
9fda261dde chore: upgrade electron to 32.2.0 (#30394)
* chore: upgrade electron to 32.2.0 -- run ci

* fix node versions

* fix build

* fix evil-dns

* various fixes

* fix srcdoc

* various fixes

* update package.json

* update yarn.lock

* various fixes

* fix integrity check

* fix binary verification

* various fixes

* update yarn.lock

* fix typo

* fix lock file

* fix tests

* fix tests

* various fixes

* various fixes

* various fixes

* fix stuff

* fix things

* try to fix errors

* fix

* updates

* add yarn berry

* upgrade electron

* attempt with gcc

* blank

* update arm64 executor

* try to fix the arm64 issue

* fix arm64

* bump cache

* attempt to fix arm64 again

* attempt to fix arm64 again

* fix darwin problems

* merge release/14.0.0

* update yarn.lock

* blank -- run ci

* blank

* blank

* blank

* try something

* try something

* clean up

* blank

* try to fix sessions issue

* fixes

* get more info

* get more info

* try something

* fix

* try something

* try something

* try something

* tweak

* one more thing

* let us see if this works

* blank

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* Apply suggestions from code review

* Apply suggestions from code review

* Update cli/CHANGELOG.md

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

* Update cli/CHANGELOG.md

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

* Update CHANGELOG.md

* Update cache-version.txt

* fix nx (maybe)

* Update package.json

* try something

* Update packages/app/src/runner/aut-iframe.ts

* bump version

* try to bust cache

* try to invalidate cache

* Update cli/CHANGELOG.md

* suppress benign warnings

* Apply suggestions from code review

* PR comments

* PR comment

* Apply suggestions from code review

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* Update cli/CHANGELOG.md

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

* update debug scenario 4 regex

* Update scripts/binary/trigger-publish-binary-pipeline.js

---------

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Matt Schile <mschile@cypress.io>
2024-10-29 14:55:26 -05: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
Bill Glesias
0e316966af misc: implement webdriver on top of geckodriver in order to reduce overhead maintenance and code (#30324)
* misc: implement webdriver npm package as the client for the webdriver specification

* misc: go back to xulstore to save browser preferences [run ci]

* add changelog [run ci]

* chore: fix screenshot resolution [run ci]

* fix check-ts issues [run ci]

* run windows ci [run ci]

* run ci

* add comments [run ci]

* build binaries for webdriver impl [run ci]

* fix Cypress namespace missing issue. see 6d7ba97c25

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* chore: updating v8 snapshot cache

* patch edgedriver and preserve dependency paths for webdriver so they are included in the binary [run ci]

* fix issues with firefox profile not being created in open mode when old profile exists from previous cypress versions where they are no longer compatible [run ci]

* address comments that came up in review [run ci]

* see if this fixes extension test [run ci]

* make sure process kill emits the exit event [run ci]

* update geckodriver to include contribution patch to types [run ci]

* fix misapplication of geckodriver package (accidentally deleted) [run ci]

* empty commit to trigger ci [run ci]

* address comments from code review [run ci]

---------

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
2024-10-15 11:18:14 -04:00
Ryan Manuel
8cff95661a misc: pass spec to beforeSpec to support better reporting on client side protocol errors (#30316)
* feat: pass spec to beforeSpec to support better reporting on client side protocol errors

* Update packages/types/src/protocol.ts

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

* update changelog

---------

Co-authored-by: Matt Schile <mschile@cypress.io>
2024-09-30 16:55:13 -05:00
Cacie Prins
1d845323d4 feat: Improve UX when Test Replay upload fails due to slow upload (#30235)
* new error message for stream stall upload failures

* new unknown error msg, extract printProtocolUploadError for testing, consolidatd args for stream stall msg

* rename env more appropriately, add sampling interval param to putProtocolArtifact

* default to 5000, override with app capture protocol value, override that with env var

* update snapshots

* fix math in upload stall error msg

* changelog

* update gql schema w/ new error msg, fix protocol tscheck

* update test to use fn for app capture supplied interval

* increase default stream stall interval to 10 seconds

* typos

* snapshots

* rename env var

* do not use user-supplied interval if it parses to NaN

* use the more standard makeErr for unknown/uncategorized upload error in visual snapshots

* rearrange upload stall error message

* fix typo

* changelog

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-09-25 11:39:28 -05: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
Matt Schile
1b1a39e9c2 feat: (protocol) setup protocol with projectId and cloud api (#30066) 2024-08-22 09:45:59 -06:00
Bill Glesias
57f6110d29 feat: implement JIT component experiment (#30049)
* feat: implement JIT component experiment [run ci]

* don't update the dev server unnecessarily if the run is cancelled [run ci]

* fix system test flake

* Update cli/types/cypress.d.ts

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

* Update system-tests/projects/experimental-JIT/webpack/cypress/support/component-index.html

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

* Update system-tests/projects/experimental-JIT/vite/cypress/support/component-index.html

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

* chore: ignore node_modules for webpack dev server

* be sure to end span when throwing error

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-08-22 10:56:55 -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
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
Cacie Prins
b62fc3fdbc fix: no longer use capture script url as default upload url for test replay recordings (#29512)
* fix: no longer attempt to upload to capture script location

* changelog
2024-05-17 11:27:31 -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
Cacie Prins
79a267c7f8 refactor: extract artifact upload process from lib/modes/record.js (#29240)
* refactor record.js to extract upload logic into ts
- streamlines the main uploadArtifact fn
- extracts artifact specific logic to artifact classes
- fully defines types for upload processing and reporting

* tweak refactors so system tests produce same snapshots

* some todos, fixes exports/imports from api/index.ts

* fix api export so it can be imported by ts files

* cleans up types

* extracting artifact metadata from options logs to debug but does not throw if errors are encountered

* fix type imports in print-run

* fix debug formatting for artifacts

* fix reporting successful protocol uploads

* change inheritence to strategy

* rm empty file

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

* makes protocolManager optional to uploadArtifacts, fixes conditional accessor in protocol fatal error report

* missed a potentially undef

* convert to frozen object / keyof instead of string composition for artifact kinds

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-04-12 09:20:54 -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
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
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
Emily Rohrbough
4b1df35741 fix: prevent timing out on short/skipped videos (#28643) 2024-01-11 09:56:31 -06: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
Chris Breiding
a423195b12 chore: Don't hoist devtools-protocol (#28372) 2023-11-22 08:19:00 -05:00
Ryan Manuel
dbd213926c fix: issue with proxy correlations and web/shared workers (#28105) 2023-10-23 22:26:21 -05:00
Ryan Manuel
4e720c8ebf chore: fix types breaking due to exposing too much inside of protocol.ts (#28035) 2023-10-11 15:27:27 -05:00
Ryan Manuel
078dc0a81e fix: support proxy correlation timeout notifications and additional proxy data (#27976) 2023-10-10 16:19:37 -05:00
Adam Stone-Lord
4c11731ee1 chore: optimize task execution (#27848)
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec686e.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeba8f.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <adams@cypress.io>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <jordan@jpdesigning.com>
Co-authored-by: Dave Kasper <dave.m.kasper@gmail.com>
2023-10-04 12:25:00 -05:00
Bill Glesias
b85dd752f2 dependency: update to electron 25 and node 18 (#27715)
* feat: update to electron 25 and bump node dependencies. need to remove
custom docker image

* chore: update node versions to 18+ [run ci]

* chore: bump @types/node from v16 to v18 and bump the typescript supported CLI version from 3.9 to 4.4

* update mock-fs to 5.2.0 to fix BigInt issue (see https://github.com/tschaub/mock-fs/releases/tag/v5.1.4) [run ci]

* chore: update electron integrity check to pass create binary job

* chore: fix issues with achrinza/node-ipc not yet having node 18 engine support (only up to 17 by patching from 9.2.2 to 9.2.5 as seen in https://github.com/achrinza/node-ipc/pull/38. vue/cli-service is not maintained and we should migrate these over to vue create at some point in the near future to get rid of these resolutions

* allow for TLSv1 tests to work with node 18 as the express server running node 18 with tlsv1 needs to allow legacy ciphers

* chore: update snyk workflows to use node 18

* chore: add changelog

* update timeout

* more cleanup during binary build

* bump cache and run ci. include ignore engines for rwa and get rid of
16.16 image references

* chore: update FF tests to 115 as serialization now works with errors and click events do not get fired on buttons being typed into

* chore: don't error when symlink already exists

* chore: fix serialization test for newer versions of firefox

* chore: fix CI config

* chore: fix chrome system tests to work with chrome 114. updates mostly caused by bugs in screen height in chrome. see https://bugs.chromium.org/p/chromium/issues/detail?id=1416398

* chore: test binary against vite update in RWA

* remove wait for RWA as it shouldnt be needed for vite. link example recipes update to node 18

chore: remove commented out code

* chore: print message when DISABLE_SNAPSHOT_REQUIRE is set

* chore: clean out unneeded dependencies always

* chore: remove trailing space

* fix: propagate click events for enter and typing on firefox 106 or later

* chore: fix changelog failures

* fix: correctly simulate click events for buttons on keyup and space type  in Firefox versions greater than 91 and simulate click for buttons on enter in Firefox versions greater than or equal to 106

* chore: add documentation to type to clarify firefox synthetic events

* chore: update protocol snapshot as order or log messages seems to have changed

* update comments

* sort commandLogChanged events for protocol

* chore: remove PR ids from CRA and CER as the PRs are merged into develop

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
2023-09-07 15:26:09 -04:00
Ryan Manuel
228a117e82 feat: swap websocket transport with cdp add binding/evaluate (#27592)
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2023-08-25 21:05:33 -05:00
Cacie Prins
626550e9f6 chore: add mountVersion to props passed to protocol setup (#27645)
* add mountVersion to metadata passed to set up protocol capture

* chore: pass mount version to protocol setup

* update tests
2023-08-25 09:30:15 -04:00
Bill Glesias
150b04cbe5 chore: add v13 welcome page content (#27549)
* feat: add v13 splash page content (wip)

chore: add video link for v13 inside graphql context and root resolver. add migration tests outside of migration manager and update component tests to test aspects

chore: update copy to most recent. Needs onlink deployments

chore: opt for named slot in major version welcome as we still want to show the changes whether or not the video is present

chore: fix video margin by shrinking the margin for a more appealing loadout

chore: update onlinks for what is expected in deploy

chore: adjust margins around video, move video up, and reduce margin on major welcome title

chore: bump release date to 8/29

chore: update stubbed query to reference actual video

* Update packages/launchpad/src/migration/MajorVersionWelcome.vue

Co-authored-by: Mark Noonan <mark@cypress.io>

* Update packages/launchpad/src/migration/MajorVersionWelcome.vue

Co-authored-by: Mark Noonan <mark@cypress.io>

* chore: update code elements to be inlinecodefragments

* chore: update utm links to reflect correct nomenclature

* stub migration src in  network performance launchpad test on video as abortcontroller is difficult to test with current ctx setup

---------

Co-authored-by: Mark Noonan <mark@cypress.io>
2023-08-24 19:36:24 -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
Matt Schile
c1a8004924 chore: added support for --runner-ui and --no-runner-ui cli options (#27582) 2023-08-18 16:32:53 -06: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
Cacie Prins
47b18d2268 chore: additional metadata for protocol capture errors (#27507)
* split protocol errors into fatal/nonfatal

* change test stubs to implement capture protocol iface

* attach spec and project metadata to nonfatal error reports

* starting to test error reporting

* properly report fatal errors to artifact endpoint

* more meaningful error reporting

* better error reporting for protocol download + initialization errors

* refactgor protocol stubs for easier instantiation and use

* tests for beforeSpec error state

* fixes api spec tests

* code review comments

* revert import style for routes to appease tscheck

* update snapshots

* fix typedef for ArtifactLike, set error message on beforeSpec stub
2023-08-15 10:37:59 -04:00
Matt Schile
9bfa454ad3 chore: updating protocol to support test isolation off (#27523) 2023-08-14 13:02:06 -06:00
Cacie Prins
fff74900fb feat: protocol terminal output (#27402)
* uploading initiation & legit no upload messaging

* report errors

* makes upload reporting uniform across artifact types

* retrieve capture meta from correct cloud endpoint

* moves skipped artifact insertion to more reasonable point

* rm unneccessary paren around Promise.all on upload

* improve zipped filesize determination for protocol uploads, clean up get db signature in protocol manager

* changelog

* add url onto protocol failure report

* rm unused err.cause consts

* ensure artifact PUT server mock resolves in system tests

* extract terminal output logic from upload flow, mask filepaths and filesizes in system tests

* update return shape for postRun when test replay is enabled

* pad beginning of liine for upload reports

* update upload messaging snapshots for record spec

* improve trailing whitespace for artifact upload terminal output

* since we are now waiting for artifact report, must include urls in test assertion

* respect quiet mode

* address correct index of reqs for api reordering specs test

* updates snapshots & adds missing artifacts PUT req for api skips specs not in parallel

* updates tests for skipping specs in parallel

* update snapshot for no upload when video disabled test

* update snapshot for update instance 500

* updates snapshot for postInstanceTests 500

* update instance stdout 500 snapshot update

* improve message format when error on uploading, update snapshots

* snapshot for api retry on error

* update snapshot for sendPreflight system tests

* update snapshots for api interaction private tests limit warning

* update snapshots when over tests limit

* updates snapshots for protocol retrieval, bypass stub verification in test mode

* set gzip header on stubbed capture code server endpoint so client can verify

* accept BROWSER env var to reduce screenshot dimension difference from local to ci

* adds artifacts PUT to manifest for stdout 500 system test

* fixes snapshot browser workaround; updates url manifest for record system tests

* fix whitespace between filesize and path in upload manifest

* manually update snapshots for video_compression

* adds system tests for disabled message from server, file size exceeded

* additional tests, bugfixes

* add logging to determine source of ci error with db files

* ensure protocol tmp dir is created before tests

* rm test env force return of failed sig check on protocol runtime

* code review comments

* fix priority nums on artifact readout

* rm commented code from protocol stub
2023-08-10 13:49:13 -04:00
Bill Glesias
4cec5a5f4a Merge branch 'develop' into chore/merge_develop_into_release_13 2023-08-06 20:30:51 -04:00
Stokes Player
eca37aec74 chore: record event gql mutation (#27416)
* feat: record event gql mutation

* Allow projectSlug to be optional

* Do not start source in run mode

* Fix unit test

* ts linting fix

* Adding test

* Adding test

* refactor

---------

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2023-08-07 09:45:37 +10:00