* patch axios for v8 snapshots
* export httpsAgent and httpAgent discretely
* set up axios interceptors for logging and error response transformation
* use unified error transform fn
* create instance api reqs, timeouts, tests
* move axios middleware to its own dir & refactor
* refactor error handling, enable retries in createInstance
* fix invocation of createInstance - not caught by ts because record.js is js
* retry on 500 - according to system test, this is expected behavior
* resolve snapshots, report retries to stdout
* fix cdp connection usage of shouldRetry due to newly unknown error type
* axios doesnt fully follow RequestOptions shape when adding request to https agent
* note why uri is treated as optional
* hail mary on getting axios to work with v8 snapshots
* update lockfile, force no-rewrite on more axios files
* attempt to fix v8 snapshots
* add verbose debugging to api request logging
* enable verbose api debugging on server unit tests
* fix nock pattern for createInstance
* remove request logging unit test - sinon/mocha does not assert correctly
* fix a few unit tests
* use runAllAsync rather than waiting an arbitrary time for sinon fake timer
* move create_instance spec to ts file, remove redundant test
* rm debug on ci
* clarify comment on change inpackages/network
* correct .uri property on patched RequestOptions to be optional
* rm unused log_requests.ts, DRY error messages
* resolve types with record.ts migration
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* chore: add type linting + compilation checks to runner package
* empty commit
* A bunch of tslint fixes
* wow it is building
* Fix issue with CT not mounting correctly with comments within it
* Fix net-stubbing.ct.ts failures
* Fix tslint: disable comment
* move target into compilerOptions
* fix tslint disable comment
* update proxy-logging to undo changes
* standardize the tslint:disable comments
* fix comment
* fix the banner content not displaying and write a test for this situation
* fix ct reference
* put target to es2020
* actually set the property with replaced title
* Update packages/reporter/src/hooks/hook-model.ts
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* Fix eslint/tslint settings for system-tests with vue 3
* bump CI cache
* update types/react resolution
* add return
* lint fix
* tslint disable for empty blocks
* exclude dist files from ts linting
* update to exclude all dist folder
* exclude dist file
* change to await
* fix line numbers of stack trace with linting updating vue file
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* 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
* chore(deps): update dependency rimraf to v5.0.10
* fix: fix clean errors caused by rimraf breaking change
* refactor: use promise instead of callback
---------
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* chore: (for eslint-plugin-dev only is breaking) update eslint-plugin dev minimum to eslint 7. Remove support for coffeescript and reconfigured required peer deps
* correctly configure eslint-plugin-json-format for the monorepo and run linting on all json files (previously was not running)
* properly support no duplicate imports
* 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>
* chore: rename errors.js -> errors.ts
* refactor: type safety on errors
* refactor: add err_template for consistent error formatting
* fix a few system tests
* fix tests; update snapshots
* Fix types
* normalize snapshot - remove chalk ansi colors
* more unit test fixes
* more system test fixes
* circleci build
* backtick always in stdout, fix error formatting and failing snapshots
* refactor: create @packages/errors
* fix import
* fix import
* fixing build / tests
* remove extraneous file
* move warnIfExplicitCiBuildId
* fix build / tests
* Fix
* error, type fixes, documentation, standardize child process error serialization
* fix import
* build errors on install
* wrote specs generating visual images of all errors
* remove unused dep
* sanitize stack traces
* add image diffing
- if base images don't exist, create them
- if base images don't match and local, overwrite them, if in CI throw
- if base images are stale and local, delete them, if in CI throw
* remove Courier New + MesloLGS NF font
* type fixes, remove Bluebird, general cleanup
* TS Cleanup
* skip typecheck on tests for now
* yarn.lock
* fix @types/chai version
* fix yarn.lock
* Different version of mocha types so it isnt patched
* errors spec snapshot
* CI fix
* fixes
* store snapshot images in circle artifacts
* dont change artifact destination prefix
* use Courier Prime
* antialias the text
* decrease pixelmatch threshold, fail in CI only when changed pixels > 100
* increase timeout
* overflow: hidden, remove new Promise, add debug logging
Co-Authored-By: Tim Griesser <tgriesser@gmail.com>
* run unit tests w/ concurrency=1
* unique window per file
* disable app hardware acceleration + use in process gpu + single process
* do not do image diffing
- conditionally convert html to images
- store html snapshots
- do not store images in git
* store snapshot html
* Merge branch 'tgriesser/chore/refactor-errors' of https://github.com/cypress-io/cypress into tgriesser/chore/refactor-errors
* remove concurrency
* fix assertion
* fixing ci
* Link in readme
* pass the browsers to listItems
* fix: build @packages/errors in CI, defer import to prevent errors locally
* Merge branch 'develop' into tgriesser/chore/refactor-errors
* develop:
chore: fix cypress npm package artifact upload path (#20023)
chore(driver): move cy.within logic into it's own file (#20036)
chore: update automerge workflows (#19982)
fix(selectFile): use target window's File/DataTransfer classes (#20003)
chore: Update Chrome (stable) to 98.0.4758.80 and Chrome (beta) to 98.0.4758.80 (#19995)
fix: Adjust ffmpeg CLI args for performance (#19983)
build: allow unified to run cypress on Apple Silicon (arm64) (backport #19067 to 9.x) (#19968)
* fix run-if-ci.sh
* remove dead code
* Mark the .html files as generated in gitattributes
* fix running single error case, slice out more of the brittle stack
* remove additional brittle stack line
* firefox web security error
* nest inside of describe
* reformat and redesign errors
* more error cleanup and standardization
* additional formatting of errors, code cleanup, refactoring
* update ansi colors to match terminal colors
* cleanup remaining loose ends, update several errors, compact excess formatters
* fix types
* additional formatting, remove TODO's, ensure no [object Object] in output
* add test for 412 server response on invalid schema
* update unknown dashboard error on creating run
* use fs.access instead of fs.stat for perf
* added PLUGINS_FILE_NOT_FOUND error
- separated out from PLUGINS_FILE_ERROR
- add system tests for both cases
- update snapshots
- remove stack trace from PLUGINS_FILE_NOT_FOUND fka PLUGINS_FILE_ERROR
* add plugins system test around plugins synchronously throwing on require
* remove forcing process.cwd() to be packages/server, update affected code
- this was a long needed hangover from very old code that was doing unnecessary things due to respawning electron from node and handling various entrypoints into booting cypress
- this also makes the root yarn dev and dev-debug work correctly because options.cwd is set correctly now
* perf: lazy load chalk
* remove excessive line since the file exists but is invalid
* fix types
* add system test when plugins function throws a synchronous error
* create new PLUGINS_INVALID_EVENT_ERROR, wire it up correctly for error template use
- properly pass error instance from child to ensure proper user stack frames
- move error display code into the right place
* only show a single stack trace, either originalError or internal cypressError
* push error html snapshots
* fix tests, types
* fix test
* fix failing tests
* fix tests
* fixes lots of broken tests
* more test fixes
* fixes more tests
* fix type checking
* wip: consistent handling of interpolated values
* feat: fixing up errors, added simple error comparison tool
* wrapping up error formatting
* Fixes for unit tests
* fix PLUGINS_VALIDATION_ERROR
* fix fs.readdir bug, show rows even if there's only markdown formatting [SKIP CI]
* when in base-list, show full width of errors
* Fix type errors
* added searching and filtering for files based on error name
* fix: system tests
* updated NO_SPECS_FOUND error to properly join searched folder + pattern
- join patterns off of process.cwd, not projectRoot
- highlight original specPattern in yellow, baseDir in blue
- add tests
* fixes failing tests
* fix test
* preserve original spec pattern, display relative to projectRoot for terminal banner
* make the nodeVersion path display in gray, not white
* fix tests, pass right variables
* fix chrome:canary snapshots
* update snapshots
* update snapshot
* strip newlines caused by "Still waiting to connect to {browser}..."
* don't remove the snapshotHtmlFolder in CI, add additional verification snapshots match to error keys symmetrically
* update snapshot
* update snapshot
* update snapshot
* update snapshot
* update snapshot
* update snapshot
* update gitignore
* fix snapshot
* update snapshot html
* update logic for parsing the resolve pattern matching, add tests
* update snapshots
* update snapshot
* update snapshot
* update snapshot
* fix failing test
* fix: error_message_spec
* fix snapshot
* run each variant through an it(...) so multiple failures are received
* add newlines to multiline formatters, add fmt.stringify, allow format overrides
* stringify invalid return values from plugins
* move config validation errors into packages/errors, properly highlight and stringify values
* add component testing yarn commands
* fix the arrow not showing on details
* fix typescript error
* fixed lots of poorly written tests that weren't actually testing anything. created settings validation error when given a string validation result.
* fixes tests
* fixes tests, adds new error template for validating within an array list (for browser validation)
* remove dupe line
* fix copy for consistency, update snapshots
* remove redundant errors, standardize formatting and phrasing
* more formatting
* remove excess snapshots
* prune out excessive error snapshot html files when not in CI
* add missing tests, add case for when config validation fails without a fileType
* fixes test
* update snapshot
* update snapshot
* update snapshot
* sort uniqErrors + errorKeys prior to assertion - assert one by one
* add system test for binding to an event with the wrong handler
* fixes tests
* set more descriptive errors when setting invalid plugin events, or during plugin event validation
* remove duplicate PLUGINS_EVENT_ERROR, collapse into existing error
* use the same multiline formatting as @packages/errors
* standardize verbiage and highlighting for consistency
* fix incorrect error path
* fixes tests, standardized and condensed more language
* Update packages/errors/src/errors.ts
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* Update guides/error-handling.md
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* Update guides/error-handling.md
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
* added some final todo's
* fix types
Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
Co-authored-by: Tim Griesser <tgriesser@gmail.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>