Commit Graph

1570 Commits

Author SHA1 Message Date
Emily Rohrbough 1bc69d106d fix(driver): readFile - verify null contents to Buffer.from (#20689)
Co-authored-by: David Munechika <david.munechika@gatech.edu>
2022-03-21 09:01:45 -05:00
Ryan Manuel 175e57eb94 fix: fix proxy logging spec (#20535) 2022-03-15 10:54:49 -05:00
Kukhyeon Heo 19db0ce0da fix: click event is fired correctly when focus has changed (#20525) 2022-03-10 21:07:44 +00:00
Kukhyeon Heo 7d87da9a73 chore: refactor log function to class (#20382) 2022-03-09 09:45:07 -06:00
renovate[bot] ae3c75381a fix(deps): update dependency url-parse to v1.5.9 [security] (#20439)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 10:00:30 -06:00
Ryan Manuel 2e62bbb25f test: update screenshot system-tests flake so that it no longer compares images for uniqueness that represent the same state (#20463) 2022-03-04 13:20:50 -06:00
renovate[bot] 47ee6e2c4a fix(deps): update dependency url-parse to v1.5.8 [security] (#20386)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-01 21:48:29 +00:00
Ryan Manuel 9db7d962b2 chore: fix net stubbing flaky tests due to bleeding interceptions (#20319) 2022-03-01 11:06:35 -06:00
Brian Mann e0bd6ac2aa fix: error regression - strip ansi colors out of cy.fixture() error message (#20335)
* fix cy.fixture regression - strip ansi colors out of fixture error message

* empty commit to appease the semantic release gods

* fix 2nd regression formatting when setting invalid config values - remove extra backtick

* increase webpack dev server timeout values
2022-02-28 12:01:54 -05:00
Kukhyeon Heo 995798c3f9 chore: remove pkg/driver //@ts-nocheck final (#20169) 2022-02-25 22:42:31 +00:00
Blue F 3d50292fc8 Merge pull request #20191 from sainthkh/issue-19541-part3
chore: move `cy.type()` event tests to its own file.
2022-02-24 13:59:37 -08:00
Ryan Manuel 05f9ad163e chore: fix net stubbing flake (#20297)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-02-23 10:46:09 -06:00
Emily Rohrbough 471c7a1a56 Merge branch 'develop' into issue-19541-part3 2022-02-22 10:35:15 -06:00
renovate[bot] 0143e13388 fix(deps): update dependency url-parse to v1.5.6 [security] (#20270)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-21 23:01:35 +00:00
KHeo c944ac6e72 Add TODO comments 2022-02-21 10:09:38 +09:00
KHeo 66229039b8 feedback 2022-02-21 09:32:43 +09:00
KHeo 52d7316038 chore: move tests to its own file. 2022-02-21 09:32:43 +09:00
Ali Kireçligöl f84bac51d0 fix(driver): update wrapErr to ignore number and boolean values (#20172)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2022-02-16 17:22:57 +00:00
Tyler Biethman 2c88f0c58e fix: Update .type(' ') to not emit clicks when the keyup event has been prevented (#20156)
* fix: Update `.type(' ')` to not emit clicks when the keyup event has been prevented

* cleanup test for click event not firing while preventing default

Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2022-02-12 17:57:07 -05:00
Emily Rohrbough 02cc29af9e chore(driver): move cy.focused and cy.root into their own files (#20054) 2022-02-11 11:56:38 -06:00
Brian Mann 29841f32b9 feat: redesign server errors (#20072)
* 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>
2022-02-11 02:06:07 -05:00
github-actions[bot] 1db89922e5 fix: Fix issues with stack traces and command log in Chrome 99 (#20049)
Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Blue F <blue@cypress.io>
Co-authored-by: Zach Bloomquist <git@chary.us>
2022-02-10 09:43:35 -08:00
Kukhyeon Heo 5d77abc7c7 fix: cy.type(' ') fires click event on button-like elements. (#20067) 2022-02-10 09:49:20 -06:00
Kukhyeon Heo e218960f4e fix: change, input events are not fired when the same option is selected again. (#19623)
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2022-02-09 10:29:24 -06:00
Kukhyeon Heo bf0d4dbcc3 chore: Remove pkg/driver //@ts-nocheck part 3 (#19837)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Zach Bloomquist <git@chary.us>
2022-02-08 16:48:30 -06:00
Deisling Eduard 62d109cee2 fix(driver): change request log message (#20009) (#20019)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Zach Bloomquist <git@chary.us>
Co-authored-by: Zach Bloomquist <github@chary.us>
2022-02-08 17:55:48 +00:00
Emily Rohrbough 1395766822 chore(driver): move cy.within logic into it's own file (#20036) 2022-02-04 08:28:06 -06:00
Zach Bloomquist 3987eb3430 fix(selectFile): use target window's File/DataTransfer classes (#20003)
Co-authored-by: Blue F <blue@cypress.io>
2022-02-02 17:10:39 +00:00
Kukhyeon Heo a43f3a2cbb fix: send click event with cy.type('{enter}'). (#19726) 2022-01-31 11:04:39 -06:00
Blue F 246db9b67e feat: Retain fileName when working with aliased fixtures and files (#19820)
* Retain fileName when working with aliased fixtures and files
* Move to getter/setter for fileName attribute
2022-01-24 16:03:29 -08:00
Blue F b16553ec70 feat: Add mimeType support; Improve TypedArray support (#19794)
* Add mimeType support; Improve ArrayBuffer support
2022-01-21 10:23:59 -08:00
Chris Breiding edb4642328 chore: Use @typescript-eslint/indent instead of eslint's indent (#19772) 2022-01-19 13:38:16 -05:00
Blue F 3809cd4d37 feat: cy.selectFile() (#19332) (#19524) 2022-01-14 10:37:29 -06:00
Lachlan Miller 1305cca9f1 fix: rename specs to correctly match convention (#19641)
* fix: rename specs to correctly match convention

* Remove underscore from TESTFILES glob pattern

Co-authored-by: Zach Bloomquist <github@chary.us>
2022-01-12 07:10:14 +10:00
Kukhyeon Heo ea531b7840 chore: remove pkg/driver //@ts-nocheck part 2 (#19483)
* listeners.ts

* chainer.ts

* command.ts

* actionability.ts

* inspect.ts

* agents.ts

* aliasing.ts

* angular.ts

* asserting.ts

* clock.ts files

* commands.ts

* debugging.ts

* fix comment.

* roll back change.

* Fix.

* fix

* Casted to cast.

* Feedback changes.

* fix any.
2022-01-11 09:37:05 -06:00
Kukhyeon Heo 325094556d fix: cy.contains() ignores <style> and <script> without removing them. (#19424)
* fix

* Merge tests.

* fix

* Apply suggestions from code review

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

* kick off build again

Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2021-12-20 14:34:12 -08:00
Blue F b6c4ba144c fix: No unnecessary snapshotting (#19311)
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2021-12-20 13:21:53 -08:00
Kukhyeon Heo 01f0261d3a chore: Remove pkg/driver @ts-nocheck part 1 (#19353)
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2021-12-20 11:40:34 -05:00
Emily Rohrbough 8e23567d5b fix(cy.intercept): allow fixtures to define null encoding when used in static response (#19379) 2021-12-16 16:44:01 -06:00
github-actions[bot] ec84f660be chore: Update Chrome (stable) to 96.0.4664.110 and Chrome (beta) to 97.0.4692.45 (#18996)
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@yahoo.com>
2021-12-15 13:56:29 -06:00
Ryan Manuel 4a97a5244e fix: Do not screenshot or trigger the failed event when tests are skipped (#19331) 2021-12-10 11:51:29 -06:00
Kukhyeon Heo 09bcc5b0ff fix (#19262)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
2021-12-10 09:17:03 -08:00
David Munechika dd0fc9b9f7 fix: throw when writing to 'read only' properties of config (#18896)
Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
2021-12-10 11:16:12 -05:00
Zach Bloomquist 65cf6e899d fix: disable automatic request retries (#19161) 2021-12-08 22:27:19 +00:00
Kukhyeon Heo d18878feea chore: refactor cy funcs (#19080)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: David Munechika <david@cypress.io>
2021-12-08 10:36:10 -06:00
Tyler Biethman 570f91dde3 fix: adding timeout option to writeFile command (#19015) 2021-12-06 15:31:25 -06:00
David Munechika 11e99fc35a chore: fix flaky tests (net stubbing, websocket, proxy logging, Firefox system tests) (#19159) 2021-12-03 16:35:04 +00:00
Kukhyeon Heo f85c736d3e fix: text events propagate out of shadow root. (#19132) 2021-12-02 14:36:26 -05:00
Hugo Hache 4630ef49d8 fix: set the context when overwriting .clock command (#19158)
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Ryan Manuel <rfmanuel@gmail.com>
2021-12-02 17:22:10 +00:00
Kukhyeon Heo 8c9b2824a8 fix: the shadow root container element is ignored when clicking an element in it. (#18908) 2021-11-23 11:40:58 -05:00