Commit Graph

17054 Commits

Author SHA1 Message Date
Brian Mann da48210216 Merge branch '10.0-release' into 10.0-release-merge-4b50f9ee 2022-02-18 15:11:59 -05:00
Ryan Manuel 01fc857f36 chore: fix system-test-firefox screenshots_spec flake (#20260) 2022-02-18 13:07:22 -06:00
Ryan Manuel 619571ec0f fix: connect to dashboard page when there are no existing projects (#20188)
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2022-02-18 11:30:47 -06:00
Mark Noonan 5d8f875a7d feat(unify): show spec runner header in run mode (#20189)
Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-02-18 09:41:17 -05:00
Tyler Biethman d4fa37e652 test: Migrate more runner UI specs to app (#20118)
* Adding remaining reporter error tests.

* Removing existing integration spec file

* Removing existing runner fixtures for error specs

* Fixing ts lint

* Testing with less tests kept in memory

* Testing some cypress-in-cypress settings to improve run-mode performance.

* Reverting changes to doc_url specs

* PR Updates. Inverting default value for 'open in IDE' validation in an attempt to reduce test time.

* Cleaning up ported code

* Update system-tests/projects/runner-e2e-specs/cypress/fixtures/index.html

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

* Trying build workaround

* Bumping up parallelized builds for app integration tests

* Removing suspicious tests to validate CI build

* Removing more suspicious tests to test CI

* Trying to not scaffold every navigation

* Bumping resources for run-app-integration job. Updating reporter.errors specs to appropriately reduce AUT refreshes.

* Couple API tweaks

* test: Migrating runner hooks specs to app

* Removing unused helper from runner package; cleaning up a few things

* Updating yarn.lock

* fix: Migrating runner sessions ui tests to app

* test: Migrating runner's runner.ui tests to app

* test: Migrating runner retries ui tests to app

* Cleaning up a few things for consistency

* Fixing ts errors

* Removing tests for runner header that have existing coverage in app

* Working around detached elements in CI

* Still working around detached elements in CI

* Updating sessions.ui test to click more carefully. Adding bit more coverage around runner header and snapshot pinning.

* Update packages/app/cypress/e2e/runner/retries.ui.cy.ts

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

* Migrating issue specs. Updating TODOs. Hopefully addressing some flake.

* Stopping icon spin animation for percy snapshots

* WIP

* customPercyCommand.ts

* WIP: working on custom percy snapshots for hiding elements other than the reporter [skip ci]

* WIP: Adding naive mutation observer for reseting DOM mutations after snapshots [skip ci]

Got tired of tripping over types, I can add them when we're feature complete

* Implementing scoped snapshots throughout app/runner tests, let's see how percy output looks

* Adding more snapshots to runner tests.

* Using spec link as click target

* Stop taking snapshots of failed tests

* Scoping selector playground snapshots (though they're still unstyled)

* Addressing flake in virtualized spec list

* Drying up runner snapshotting

* Logging single percy snapshot that reflects proper viewport and overrides

* Updating describes to better match previous snapshot names

* Removing added snapshots to get more accurate better diff presentation in Percy

* Removing new runner.ui snapshots as well

* Adding a few PR recommendations. Updating one last spec name that was corrected for grammar and no longer matched. Updating/removing relevant TODOs.

* Updating to use anticipated default width for reporter

* Updating tests for consistency with previous snapshots

* Tying original command into promise chain

* Let's try that again

* Making percy command enqueuing explicit to test result

* Scoping down on some variables. Using defaults for sessions tests.

* Updating some overrides to see if visibility is handled inconsistently

* Whitespace vanquished, working session test updates back in for long command logs

* Viewport height is not reflected in snapshots, let's try forcing the height on the panel

* Forcing the height issue

* Let's try a minHeight on the percy command

* Cleaning up alterations made during percy exploration

* Trying to get a cleaner percy diff after merge

* Fix Percy to use 10.0-release branch as baseline image comparison

* add comments about temporary percy env vars

* Adding some doc for changes made to customPercyCommand

Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@yahoo.com>
2022-02-17 18:29:44 -06:00
Barthélémy Ledoux 3fbed9b81c fix: refactor function getFilesByGlob to use concat instead of isArray (#20245)
* fix: avoid using Array.isArray when possible

* fix: add one more refactoring

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-02-18 10:14:21 +10:00
Zachary Williams eba409b8f9 fix: migration hover/focus states (#20243)
Co-authored-by: ElevateBart <ledouxb@gmail.com>
2022-02-17 14:28:37 -06:00
David Munechika 3331c625c2 test(unify): Settings E2E Tests (#20126)
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-02-17 11:33:16 -05:00
Tim Griesser 61e9f00517 fix: cleanup a few more tests/snapshot errors 2022-02-17 10:43:22 -05:00
Tim Griesser 6727893b1e fix: additional cleanup of errors following merge 2022-02-17 09:59:30 -05:00
Barthélémy Ledoux 7c6ee76b95 test: fix some windows tests (#20225) 2022-02-16 19:41:34 -06:00
Shawn Taylor e3ccbf9560 feat(unify): inline specs list tweaks (#20157) 2022-02-16 18:40:00 -05:00
Tim Griesser 9a1874d6a8 fix: clean up a few test failures 2022-02-16 17:07:53 -05:00
Tim Griesser 9307dc01ec fix: types for config changes 2022-02-16 16:14:27 -05:00
Zach Bloomquist 8c01c70317 chore: ignore checksums when installing Chrome in Windows CI (#20210) 2022-02-16 18:00:18 +00:00
Alejandro Estrada 8ab32a3855 fix: rename folder instead of skip on migration (#20145)
Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-02-16 09:12:40 -07:00
Zach Bloomquist 73e936e289 test: clean up scaffoldMigrationProject (#20203) 2022-02-15 18:07:27 +00:00
Barthélémy Ledoux 047a5a8faf fix: migration on windows (#20063)
Co-authored-by: Zach Bloomquist <git@chary.us>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2022-02-15 09:51:38 -06:00
Brian Mann 025f5cdda3 use proper method call 2022-02-15 02:30:50 -05:00
Brian Mann f076a64f3b rename clone -> cloneErr 2022-02-15 02:15:15 -05:00
Brian Mann b8fb9abece fix missing ref 2022-02-15 02:03:57 -05:00
Brian Mann 923ab0a9ba export additional properties on error, update refs, fix tests 2022-02-15 02:03:14 -05:00
Brian Mann e53e74f1f3 export what is called directly to avoid circular ref proxy that's unstubbable 2022-02-14 20:49:35 -05:00
Brian Mann 81a0b0f0d2 fix require, lazy load if necessary 2022-02-14 18:58:34 -05:00
Brian Mann 7848147f88 add visual tests for new errors, update formatting + copy of existing errors to bring into parity with new conventions 2022-02-14 18:35:43 -05:00
Barthélémy Ledoux 31376a6bb6 test: use async copy for scaffolding project (#20181) 2022-02-14 16:21:52 -06:00
Cesar 3103442b92 fix: migration ui differences (#20134)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
2022-02-14 14:00:48 -07:00
Barthélémy Ledoux e7718f7489 fix: remove phantom migration watchers (#20180) 2022-02-14 14:01:14 -06:00
David Munechika 87463d8d86 fix: Remove mention of Cypress Studio from Experimental Project Settings (#20154) 2022-02-14 12:29:48 -05:00
Tim Griesser 6279a7dd10 wip: type fixes & changes after merge 2022-02-14 08:20:11 -05:00
Tim Griesser 678bedeca6 Merge branch 'develop' into 10.0-release
* develop:
  feat: gray out the path to system node in cypress run header (#20121)
  feat: redesign server errors (#20072)
  test: fix awesome-typescript-loader test and remove test-binary job (#20131)
  fix: Fix issues with stack traces and command log in Chrome 99 (#20049)
  fix: `cy.type(' ')` fires click event on button-like elements. (#20067)
  fix: `change`, `input` events are not fired when the same option is selected again. (#19623)
  build: publish vue3 on latest (#20099)
  chore: release @cypress/webpack-preprocessor-v5.11.1
  chore: release @cypress/webpack-dev-server-v1.8.1
  fix: detect newly added specs in dev-server compilation (#17950)
  chore: Remove pkg/driver //@ts-nocheck part 3 (#19837)
  chore: set up semantic-pull-request GitHub Action (#20091)
  chore: release @cypress/react-v5.12.2
  fix: remove nullish coalescing in js files to support node 12 (#20094)
  docs: update @cypress/webpack-preprocessor links (#19902)
  refactor: use aliases instead of meta (#19566)
2022-02-13 15:36:48 -05:00
Cesar 0708773fb0 fix: cleanup integration folder after moving specs to e2e (#20149)
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
Co-authored-by: ElevateBart <ledouxb@gmail.com>
2022-02-11 17:12:49 -07:00
Ryan Manuel c52e07d576 feat: Update version checking logic to query the manifest and ensure ctx.util.fetch can handle a proxy (#20107)
Co-authored-by: Zach Bloomquist <git@chary.us>
2022-02-11 17:00:16 -06:00
Tim Griesser 75ecfcfaba fix: use github.com qualified path to deal with yarn cache bug (#20158) 2022-02-11 17:06:02 -05:00
Barthélémy Ledoux 759449c440 feat: detect component testing env (#20002)
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-02-11 15:38:09 -06:00
Tyler Biethman 22c1683f3c fix: Backing out driver change for type (#20155)
* fix: Backing out driver change for type

* Adding comment for posterity

* Fixing test
2022-02-11 14:44:43 -06:00
Barthélémy Ledoux 9cad97a3c8 feat: package manager in update modal (#20123) 2022-02-11 13:56:26 -06:00
Zachary Williams faa8fb5302 fix: remove inner scroll from BaseError (#20104) 2022-02-11 09:32:26 -06:00
Alejandro Estrada 5c5f5d5853 feat: reconfigure project from testing type card (#20109) 2022-02-11 09:31:28 -06:00
Brian Mann 4b50f9eec3 feat: gray out the path to system node in cypress run header (#20121) 2022-02-11 09:55:10 -05:00
Alejandro Estrada 8a6768fee6 feat: use devServer instad of startDevServer (#20092)
* feat: use devServer instad of startDevServer

* Fix tests

* Update with feedback

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-02-11 09:46:58 -05: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
Tyler Biethman 857f30691b test: Update specs_list_e2e.cy.ts (#20151)
* Update specs_list_e2e.cy.ts

* test: another commit because my first was not semantic
2022-02-11 16:06:49 +10:00
Shawn Taylor b6bba457eb feat(unify): SpecsList UI tweaks (#20024)
* Line up left edge

* Change border color

* Display numerator and denominator of search

* Tests for search matched files

* Fix TS & tests

* Adjust hover state

* forgot to commit this earlier

* fix bug where placeholder is shown while a search is active

* fix merge issue

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
2022-02-11 14:16:34 +10:00
Tyler Biethman cd9593f353 Merge pull request #20146 from cypress-io/merge-develop-into-10.0
chore: Merge branch 'develop'  into 10.0-release
2022-02-10 19:24:36 -06:00
Tyler Biethman 35e883acd1 Fixing broken tests 2022-02-10 18:15:26 -06:00
Tyler Biethman 3a96b7f0e4 Merge branch '10.0-release' of https://github.com/cypress-io/cypress into merge-develop-into-10.0 2022-02-10 17:33:22 -06:00
Tyler Biethman ed6d08e53f Tweaking type click event logic to handle default prevented events 2022-02-10 16:46:31 -06:00
David Munechika dedc762aae test(unify): Reporter header e2e tests (#20005)
Co-authored-by: Emily Rohrbough  <emilyrohrbough@users.noreply.github.com>
2022-02-10 17:29:25 -05:00
David Munechika a2ffa61f53 test(unify): Add E2E Tests for "Specs List" (#20038) 2022-02-10 17:05:00 -05:00