Commit Graph

271 Commits

Author SHA1 Message Date
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
Bill Glesias 8102a09200 Merge branch 'develop' of https://github.com/cypress-io/cypress into merge-develop-into-13 2023-08-04 16:27:38 -04:00
Bill Glesias 68f8f99a9d chore: update node types from v14 to v16 latest to be current (no 16.16.0 types exist). Fixes types issues with webpack upgrade. (#27425)
chore: bump the Typescript minimum version in the CLI from 3.4 to 3.9
2023-08-01 09:16:49 -04:00
Bill Glesias 8bc38894d5 Merge branch 'develop' into chore/merge_develop 2023-07-25 12:28:35 -04:00
Bill Glesias 2e092add12 perf: no longer pause every single request through CDP and only pause requests needed for AUT document [run ci] (#26623) 2023-07-21 13:38:35 -04:00
Matt Henkes 773eb8db56 chore: fix memory import (#27326) 2023-07-18 15:02:53 -05:00
Matt Henkes cb6152503a chore: fix memory import (#27324) 2023-07-18 09:34:15 -05:00
Matt Schile 0e936c5222 Merge branch 'develop' into mschile/v13_merge_develop 2023-07-14 13:41:53 -06:00
Dave Kasper 298dadcaa0 chore: increase protocol enabled postDataSize (#27283)
* chore: increase data size for automation protocol

* add unit tests

* add comment for default values

* attempt to fix flake

* undo flake fix

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2023-07-13 12:29:10 -05:00
Matt Henkes 1fcdc878b6 chore: add telemetry span around collecting garbage (#27259)
* chore: add telemetry span around collecting garbage

* Apply suggestions from code review

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

* Apply suggestions from code review

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

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
2023-07-13 10:41:20 -05:00
Bill Glesias 32cfa50f0e chore: remove the electron extension API and opt for CDP methods to leverage Fetch.Enable/Paused (#27205)
* chore: refactor electron to use CDP instead of extension [run ci]

* chore: refactor pause methods to CDPAutomation from electron and chrome
[run ci]
2023-07-12 11:02:43 -04:00
Bill Glesias a0024e57ab chore: use setWindowOpenHandler over 'new-window' event as it has been deprecated in Electron v13 and removed in Electron v22 (#27256) 2023-07-12 11:02:06 -04:00
Ryan Manuel 51fa53ca56 Merge branch 'develop' into release/13.0.0 2023-06-30 10:08:27 -05:00
Bill Glesias dd02dc5fe1 chore: fix electron crashing mid launch when the crash happens before… (#27178) 2023-06-30 10:07:42 -05:00
Bill Glesias d68a3aa002 Merge branch 'develop' into chore/develop-into-release-13 2023-06-29 14:32:24 -04:00
Bill Glesias f05f6236b9 fix: electron crashing prematurely when window closes prematurely while browser launch process is ongoing (#27167)
* chore: add system test for desired behavior

* fix: issue where process was exiting when window was being closed while launch process was occuring

* chore: add changelog entry
2023-06-29 14:30:56 -04:00
Bill Glesias b48663224b Merge branch 'develop' into chore/develop-into-release-13 2023-06-28 10:35:29 -04:00
Matt Schile a94a48ed31 fix: use open instead of connectToNewSpec in electron (#27128)
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2023-06-27 09:07:39 -05:00
Bill Glesias fe54cf504a fix: chrome crash when CRI client is disconnected (#27116)
* fix: fix chrome crash when CRI client is disconnected

* chore: build binaries for chrome recovery crash for users to test

* chore: add changelog entry
2023-06-26 15:24:18 -04:00
Bill Glesias 98a0f4f6ba Merge branch 'develop' into feat/protocol 2023-06-13 17:17:44 -04:00
Matt Henkes 5b27edd6f2 feat: chrome headless new (#26481)
* use headless new

* build more things

* test fixes

* flex based on version

* tests

* update changelog

* Apply suggestions from code review

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

---------

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2023-06-09 10:48:33 -05:00
Tim Griesser d2ef2c1393 feat: capture protocol delivery (#26421)
Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: David Rowe <95636404+davidr-cy@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2023-05-15 14:06:27 -05:00
Ryan Manuel fd8979dcf3 chore: merge develop to feat/protocol 2023-04-28 16:28:23 -05:00
Ryan Manuel 8ed09aaf9b fix: unify cdp approach to fix devtools in electron (#26573) 2023-04-27 14:40:29 -05:00
Ryan Manuel a64011d2f4 chore: tweak timing of connecting to browser for CDP (#26544) 2023-04-20 11:21:58 -05:00
Ryan Manuel b7c3e86b2b Merge pull request #26494 from cypress-io/ryanm/chore/merge-develop 2023-04-13 18:01:51 +00:00
Matt Schile 66bd1825c0 chore: connecting to electron browser (#26471) 2023-04-13 11:40:56 -06:00
Ryan Manuel 2d3650902d chore: merge develop to feat/protocol 2023-04-13 09:58:32 -05:00
Matt Henkes 62f58e00ec chore: Add open telemetry to cypress to allow us to monitor the performance of the app overtime (#26305)
* initial commit, a kinda working prototype

* Ready to test in CI

* "SyntaxError: Cannot use import statement outside a module" I blame VS code for always inserting the wrong dependency

* try using built js instead of the ts file

* typescript fixes?

* get version correctly, don't use optional chaining in child process.

* trying this, idk

* try running telemetry for driver-integration-tests-chrome

* fix missing spans, add more attributes for some spans

* fix missing spans and add suite spans

* types

* Remove un-used require

* remove spans for describe blocks in favor of the full title for tests

* migrate to sync resource discovery, start new custom exporters for spans

* encrypted

* localhost

* don't do things on child process

* latest changes

* update server start span time / add v8 snapshot span & update command span names

* prepare for sync

* don't send blank key

* make telemetry work again for sending directly to honeycomb

* web-socket exporter

* Add in IPC exporter and message the child process before disconnecting

* Use the cloud api by default

* move cloud span exporter into telemetry package

* shutdown fixes

* fix enabled

* improve types

* run in ci

* yml is the worst

* type!

* add spans for timing insights for visible areas of improvement

* type errors

* lets try sending data to staging

* types

* types again

* remove problematic attributes

* clean up exporters

* i like this better even though it doesn't seem to matter much

* some self review cleanup

* Update comment

* add debug messages

* mocha tests

* actually exit with the right code... oops

* simple mistake... have to look into how to fix with ts...

* try this i guess

* don't return undefined

* read me diagram

* color?

* no rect

* moar diagram

* docs!

* formatting

* build more binaries

* Supposedly fix cypress in cypress test failures

* test 'fixes'

* try this instead

* do not transpile cypress packages dir

* lets try escaping our regex string

* Add some diagnostics to help test the built binary....

* try a more complex solution

* fix tests probably

* just ignore the specific file

* fix unit tests

* cr updates

* Apply suggestions from code review

Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Bill Glesias <bglesias@gmail.com>

* Pr updates

* don't change the command queue

* move encoding and decoding telemetry context for ipc to the telemetry package

* build darn it

* plead for mercy from the testing gods, i merely wished to have named test reports, but clearly i have overreached.

* pr updates, send record key

* pr review

* optional chaining fails tests

* Apply suggestions from code review

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

* tests for cloud-span-exporter

* bad merge

* adding tests for the remaining exporters

* note

* docs

* Correctly set test under the current run span for component testing

* gate sending the message.

* pr updates

* finally, fingers crossed.

---------

Co-authored-by: Emily Rohrbough <emilyrohrbough@yahoo.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2023-04-08 21:18:02 -05:00
Ryan Manuel c08b827f95 chore: add schema infrastructure and switch CDP client to be passed into protocol directly (#26222)
Co-authored-by: Matt Schile <mschile@cypress.io>
2023-03-29 20:30:20 -05:00
Ryan Manuel bbe90abee7 chore: add better-sqlite3 dependency (#26168)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2023-03-23 12:01:13 -05:00
Ryan Manuel 32a73f740f chore: initial protocol api work (#26080)
Co-authored-by: Matt Schile <mschile@cypress.io>
2023-03-13 16:32:09 -05:00
Malvitus fcac397fe8 feat: Added configuration parameter that controls the amount of connection attempts to the browser (#25848)
* feat: Added configuration parameter that controls the amount of connection attempts to the browser

* Revert "feat: Added configuration parameter that controls the amount of connection attempts to the browser"

This reverts commit 4fd816a7fe.

* feat: Added configuration parameter that controls the amount of connection attempts to the browser

* feat: Adjusted naming to match other env Variables

* Fix Off by one error in firefox utils

Co-authored-by: Matt Henkes <mjhenkes@gmail.com>

* Updated Changelog

* Update cli/CHANGELOG.md

* Update cli/CHANGELOG.md

* Update cli/CHANGELOG.md

* Trying to fix unit test

---------

Co-authored-by: fburgard <fburgard@testfabrik.com>
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2023-03-02 15:56:37 -06:00
Chris Breiding 8eb60b6ad5 fix: Ensure orphaned browser instance is killed before connecting to a new one (#25898) 2023-02-22 15:47:56 -05:00
Ryan Manuel d1ac427fc3 chore: issue with ts-loader missing in binary and problematic esbuild norewrite construct (#25797) 2023-02-14 08:20:56 -06:00
Matt Schile 8435cdc952 fix: Revert "fix: adding emergency garbage collection for chromium-based browsers" (#25546) 2023-01-23 12:09:52 -07:00
Matt Schile 83b2cc1f74 fix: adding emergency garbage collection for chromium-based browsers (#25521) 2023-01-19 14:01:18 -07:00
Matt Schile d1dc1258ea fix: improve memory management for chromium-based browsers (#25462) 2023-01-18 15:35:57 -07:00
Matt Henkes 841c4094c2 fix: electron video performance (#25189)
* fix: use screencast opts for electron video recording.

* build artifacts
2022-12-15 16:40:58 -06:00
Blue F 24f65d8b30 fix: Remove unneeded Firefox headless hack (run ci) (#25009)
* fix: Remove unneeded Firefox headless hack (run ci)

* Add test to cover new case

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-12-08 09:40:43 -08:00
Chris Breiding 27b0f2186f fix: Use hostname as default domain for cookie commands (#24692)
BREAKING CHANGE: Cookie commands now use the the hostname and not the superdomain for the domain by default. This may affect what cookies are returned/set/cleared by cookie commands.
2022-11-23 09:54:09 -05:00
Chris Breiding e4be9697bd Merge branch 'develop' into merge-develop-v12-2022-11-14-take-2 2022-11-14 13:57:38 -05:00
Chris Breiding bf2fc3a848 feat: Add domain option to cookie commands (#24471) 2022-11-04 14:32:59 -04:00
Bill Glesias 6055af37b0 Merge branch 'develop' of github.com:cypress-io/cypress into release/12.0.0 2022-11-02 10:27:39 -04:00
Matt Schile 69873ae988 chore: remove experimentalSessionAndOrigin flag (#24340)
BREAKING CHANGE: removed experimentalSessionAndOrigin flag. testIsolation defaults to strict
2022-10-24 08:49:13 -06:00
Matt Henkes 382e0b525d fix: detect chrome browser process and tab crashes to no longer hang in CI (#24338)
* Handle chrome tab and browser crashes.

* handle process crashes and add system tests

* handle crashing on windows

* updating comment

* update unit tests

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

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

* Apply suggestions from code review

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

* fix flaky system test probably

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2022-10-21 15:10:26 -05:00
Zach Bloomquist 688b7ea33e feat(webkit): fix multidomain driver tests in WebKit (#23442)
* Initial async changes

* Small fixes and test updates.

* updating tests

* Fixes for cookie login tests

* remove the onlys

* Most tests passing

* Fix driver tests?

* fix firefox test?

* fix unit tests

* fix tests??

* a better check

* fix integration tests

* minor cleanup

* Comment out tyler fix for 10.0 origin issue

* also fix integration tests

* remove fixmes

* Adding Retries for cookie actions. May break other error tests.

* Address (some) PR comments

* factor console logging out of run.ts

* fix print-run

* minimize diff

* chore(server): convert browsers/index to typescript

* fix tests

* update stubbed tests

* convert electron.js to .ts

* Suggestions from code review

* Clean up new type errors

* electron.connectToExisting can be sync

* more type errors for the type god

* Suggestions from code review

* refactor: move more of video capture into browser automations

* unit tests

* refactor: move videoCapture to browsers

* fix snapshots

* update to warn about cross origin command AUT in assertions

* Fix type errors

* fix multi-spec videos?

* webkit video recording works!

* webkit system tests

* skip system-tests that won't be fixed in this PR

~60 tests skipped out of ~99:
* ~6 skipped due to needing multidomain support
* ~8 skipped due to missing before:browser:launch support
* ~22 skipped due to broken stack traces

* fix single-tab mode

* cleanup/api renames

* fix more tests

* minimize diff, fix ff

* fix unit tests

* fix tests

* cleanup

* Move document.cookie patch to injection

* enable ci job

* fix up/add request events to webkit automation

* update undefined message

* doesn't need an underscore

* Adding iframe patching.

* forward errors prior to attaching

* Add error message when using visit to visit a cross origin site with the onLoad or onBeforeLoad options.

* Attempt to fix test errors.

* more fixes, but not all

* use the origin policy

* Fix types

* more fixes

* consider chromeWebSecurity when checking if you can communicate with the AUT

* firefox

* prevent hangs if before unload happens after on load.

* Fix some ToDos

* code cleanup

* remove quotes

* Code review changes

* more cr changes

* fix tests possibly

* Updating cy.origin websocket for webkit connection error

* for realz this time

* temp fix for before:unload/load issue

* roll back change

* Fix some flake

* temporarily comment out autWindow.Error patch

* updating cookies to match develop

* update circle.yml

* commenting out driver-integration-tests-webkit-experimentalSessionAndOrigin

* revert cookie test change

* revert cross origin change

* Fix clear cookie problem

* Try it again

* test cy.origin in webkit

* Skip origin tests when running in webkit

* missed one

* attempt to revert web_security changes

* enable sessions on webkit

* maybe this fixes system tests??

* Update web_security_spec.js

* Update web_security_spec.js

* file cleanup

* Unify socket creation logic

* Address PR Comments

Co-authored-by: mjhenkes <mjhenkes@gmail.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
2022-10-12 16:21:58 -05:00
Matt Schile 0e62696a0e fix: add support for checking multiple hosts when connecting to CDP (#24155) 2022-10-10 21:45:48 -06:00
Bill Glesias a41b104880 chore: simulated cookie fixes 1 (#24060)
* chore: add documentation to CDP,electron, and web extension for selected resource types

* chore: change nomenclature of X-Cypress-Request to X-Cypress-Is-XHR-Or-Fetch

* chore: remove no longer applicable comment for socket code

* chore: add comments to the resourceType/credential manager
2022-10-03 10:05:34 -04:00
Bill Glesias e6d8f45f48 Merge branch 'develop' into feature/simulated-top-cookie-handling 2022-09-27 17:12:14 -04:00